diff options
author | Takashi Iwai <tiwai@suse.de> | 2005-09-05 19:17:58 +0400 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2005-09-12 12:41:56 +0400 |
commit | 16dab54b8cbac39bd3f639db5d7d0fd8300a6cb0 (patch) | |
tree | a7e9f4561bb4df38222c2ef5a48d111f52cc5dd3 /sound/sparc | |
parent | ecbcfe36fa882e9f8f2be63ac0c42978336bf997 (diff) | |
download | linux-16dab54b8cbac39bd3f639db5d7d0fd8300a6cb0.tar.xz |
[ALSA] Add snd_card_set_generic_dev() call
ARM,SA11xx UDA1341 driver,Generic drivers,MPU401 UART,MIPS
MIPS AU1x00 driver,PPC,PPC PowerMac driver,SPARC,SPARC AMD7930 driver
SPARC cs4231 driver,SPARC DBRI driver
- Added snd_card_set_generic_dev() call.
- Added SND_GENERIC_DRIVER to Kconfig.
- Clean up the error path in probe if necessary.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/sparc')
-rw-r--r-- | sound/sparc/Kconfig | 3 | ||||
-rw-r--r-- | sound/sparc/amd7930.c | 3 | ||||
-rw-r--r-- | sound/sparc/cs4231.c | 3 | ||||
-rw-r--r-- | sound/sparc/dbri.c | 29 |
4 files changed, 23 insertions, 15 deletions
diff --git a/sound/sparc/Kconfig b/sound/sparc/Kconfig index 25a8a558ef92..09ab138646a6 100644 --- a/sound/sparc/Kconfig +++ b/sound/sparc/Kconfig @@ -7,6 +7,7 @@ config SND_SUN_AMD7930 tristate "Sun AMD7930" depends on SBUS && SND select SND_PCM + select SND_GENERIC_DRIVER help Say Y here to include support for AMD7930 sound device on Sun. @@ -17,6 +18,7 @@ config SND_SUN_CS4231 tristate "Sun CS4231" depends on SND select SND_PCM + select SND_GENERIC_DRIVER help Say Y here to include support for CS4231 sound device on Sun. @@ -27,6 +29,7 @@ config SND_SUN_DBRI tristate "Sun DBRI" depends on SND && SBUS select SND_PCM + select SND_GENERIC_DRIVER help Say Y here to include support for DBRI sound device on Sun. diff --git a/sound/sparc/amd7930.c b/sound/sparc/amd7930.c index bd8a850e93ea..ed0d5f2f0888 100644 --- a/sound/sparc/amd7930.c +++ b/sound/sparc/amd7930.c @@ -1088,6 +1088,9 @@ static int __init amd7930_attach(int prom_node, struct sbus_dev *sdev) if ((err = snd_amd7930_mixer(amd)) < 0) goto out_err; + if ((err = snd_card_set_generic_dev(card)) < 0) + goto out_err; + if ((err = snd_card_register(card)) < 0) goto out_err; diff --git a/sound/sparc/cs4231.c b/sound/sparc/cs4231.c index 36f9fe4d7bea..bd169f541181 100644 --- a/sound/sparc/cs4231.c +++ b/sound/sparc/cs4231.c @@ -1915,6 +1915,9 @@ static int cs4231_attach_finish(snd_card_t *card, cs4231_t *chip) if ((err = snd_cs4231_timer(chip)) < 0) goto out_err; + if ((err = snd_card_set_generic_dev(card)) < 0) + goto out_err; + if ((err = snd_card_register(card)) < 0) goto out_err; diff --git a/sound/sparc/dbri.c b/sound/sparc/dbri.c index 941c7b1e7ebb..a56f81bb0049 100644 --- a/sound/sparc/dbri.c +++ b/sound/sparc/dbri.c @@ -2657,26 +2657,20 @@ static int __init dbri_attach(int prom_node, struct sbus_dev *sdev) } dbri = (snd_dbri_t *) card->private_data; - if ((err = snd_dbri_pcm(dbri)) < 0) { - snd_dbri_free(dbri); - snd_card_free(card); - return err; - } + if ((err = snd_dbri_pcm(dbri)) < 0) + goto _err; - if ((err = snd_dbri_mixer(dbri)) < 0) { - snd_dbri_free(dbri); - snd_card_free(card); - return err; - } + if ((err = snd_dbri_mixer(dbri)) < 0) + goto _err; /* /proc file handling */ snd_dbri_proc(dbri); - if ((err = snd_card_register(card)) < 0) { - snd_dbri_free(dbri); - snd_card_free(card); - return err; - } + if ((err = snd_card_set_generic_dev(card)) < 0) + goto _err; + + if ((err = snd_card_register(card)) < 0) + goto _err; printk(KERN_INFO "audio%d at %p (irq %d) is DBRI(%c)+CS4215(%d)\n", dev, dbri->regs, @@ -2684,6 +2678,11 @@ static int __init dbri_attach(int prom_node, struct sbus_dev *sdev) dev++; return 0; + + _err: + snd_dbri_free(dbri); + snd_card_free(card); + return err; } /* Probe for the dbri chip and then attach the driver. */ |