summaryrefslogtreecommitdiffstats
path: root/sound/sparc/dbri.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2005-09-05 17:17:58 +0200
committerJaroslav Kysela <perex@suse.cz>2005-09-12 10:41:56 +0200
commit16dab54b8cbac39bd3f639db5d7d0fd8300a6cb0 (patch)
treea7e9f4561bb4df38222c2ef5a48d111f52cc5dd3 /sound/sparc/dbri.c
parentecbcfe36fa882e9f8f2be63ac0c42978336bf997 (diff)
[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/dbri.c')
-rw-r--r--sound/sparc/dbri.c29
1 files changed, 14 insertions, 15 deletions
diff --git a/sound/sparc/dbri.c b/sound/sparc/dbri.c
index 941c7b1e7eb..a56f81bb004 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. */