Commit 61be3ce0 authored by Bjorge Dijkstra's avatar Bjorge Dijkstra Committed by Jaroslav Kysela

[ALSA] ac97 - make ac97 codec device name unique

AC97 Codec
The patch fixes the bus_id conflict error when registering two codecs
of the same type (ALSA bug#1334).
Signed-off-by: default avatarBjorge Dijkstra <bjorge@gmx.net>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent e8da2fbc
...@@ -1829,7 +1829,7 @@ static int snd_ac97_dev_register(snd_device_t *device) ...@@ -1829,7 +1829,7 @@ static int snd_ac97_dev_register(snd_device_t *device)
ac97->dev.parent = ac97->bus->card->dev; ac97->dev.parent = ac97->bus->card->dev;
ac97->dev.platform_data = ac97; ac97->dev.platform_data = ac97;
ac97->dev.release = ac97_device_release; ac97->dev.release = ac97_device_release;
strncpy(ac97->dev.bus_id, snd_ac97_get_short_name(ac97), BUS_ID_SIZE); snprintf(ac97->dev.bus_id, BUS_ID_SIZE, "card%d-%d", ac97->bus->card->number, ac97->num);
if ((err = device_register(&ac97->dev)) < 0) { if ((err = device_register(&ac97->dev)) < 0) {
snd_printk(KERN_ERR "Can't register ac97 bus\n"); snd_printk(KERN_ERR "Can't register ac97 bus\n");
ac97->dev.bus = NULL; ac97->dev.bus = NULL;
......
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