Commit 873ab035 authored by Takashi Iwai's avatar Takashi Iwai

ALSA: x86: Fix driver name string overflow

The driver sets card->driver name string over its size (16 bytes).
Shorten the name string to fit with it.

Also, set more verbose string to card->shortname and ->longname.
This doesn't have to be identical with card->driver at all.
Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 075a1d46
...@@ -1694,7 +1694,8 @@ static int hdmi_lpe_audio_probe(struct platform_device *pdev) ...@@ -1694,7 +1694,8 @@ static int hdmi_lpe_audio_probe(struct platform_device *pdev)
ctx->card = card; ctx->card = card;
ctx->aes_bits = SNDRV_PCM_DEFAULT_CON_SPDIF; ctx->aes_bits = SNDRV_PCM_DEFAULT_CON_SPDIF;
strcpy(card->driver, INTEL_HAD); strcpy(card->driver, INTEL_HAD);
strcpy(card->shortname, INTEL_HAD); strcpy(card->shortname, "Intel HDMI/DP LPE Audio");
strcpy(card->longname, "Intel HDMI/DP LPE Audio");
ctx->irq = -1; ctx->irq = -1;
ctx->tmds_clock_speed = DIS_SAMPLE_RATE_148_5; ctx->tmds_clock_speed = DIS_SAMPLE_RATE_148_5;
......
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
#define HAD_REG_WIDTH 0x08 #define HAD_REG_WIDTH 0x08
#define HAD_MAX_HW_BUFS 0x04 #define HAD_MAX_HW_BUFS 0x04
#define HAD_MAX_DIP_WORDS 16 #define HAD_MAX_DIP_WORDS 16
#define INTEL_HAD "IntelHdmiLpeAudio" #define INTEL_HAD "HdmiLpeAudio"
/* DP Link Rates */ /* DP Link Rates */
#define DP_2_7_GHZ 270000 #define DP_2_7_GHZ 270000
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment