diff options
author | Takashi Iwai <tiwai@suse.de> | 2008-07-30 15:01:45 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2008-10-13 02:43:00 +0200 |
commit | f44ac8378d3d84b912b34f08afaff64182ee1b41 (patch) | |
tree | eb89207bbb0697655d6b18480d106106c2357295 /sound/pci/hda/hda_proc.c | |
parent | 603c40199252f0c3b91fca02fd3283c4f8e55179 (diff) |
ALSA: hda - Allocate name string of each codec
Allocate dynamically the name string of each codec instead of
pointing to a static string.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_proc.c')
-rw-r--r-- | sound/pci/hda/hda_proc.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sound/pci/hda/hda_proc.c b/sound/pci/hda/hda_proc.c index 743d77922bce..64ab19f14f79 100644 --- a/sound/pci/hda/hda_proc.c +++ b/sound/pci/hda/hda_proc.c @@ -511,12 +511,11 @@ static void print_codec_info(struct snd_info_entry *entry, struct snd_info_buffer *buffer) { struct hda_codec *codec = entry->private_data; - char buf[32]; hda_nid_t nid; int i, nodes; - snd_hda_get_codec_name(codec, buf, sizeof(buf)); - snd_iprintf(buffer, "Codec: %s\n", buf); + snd_iprintf(buffer, "Codec: %s\n", + codec->name ? codec->name : "Not Set"); snd_iprintf(buffer, "Address: %d\n", codec->addr); snd_iprintf(buffer, "Vendor Id: 0x%x\n", codec->vendor_id); snd_iprintf(buffer, "Subsystem Id: 0x%x\n", codec->subsystem_id); |