aboutsummaryrefslogtreecommitdiffstats
path: root/sound/drivers/mpu401
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2005-09-05 11:17:58 -0400
committerJaroslav Kysela <perex@suse.cz>2005-09-12 04:41:56 -0400
commit16dab54b8cbac39bd3f639db5d7d0fd8300a6cb0 (patch)
treea7e9f4561bb4df38222c2ef5a48d111f52cc5dd3 /sound/drivers/mpu401
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/drivers/mpu401')
-rw-r--r--sound/drivers/mpu401/mpu401.c26
1 files changed, 16 insertions, 10 deletions
diff --git a/sound/drivers/mpu401/mpu401.c b/sound/drivers/mpu401/mpu401.c
index cb36ecb78697..54e2ff9b5ca1 100644
--- a/sound/drivers/mpu401/mpu401.c
+++ b/sound/drivers/mpu401/mpu401.c
@@ -77,20 +77,26 @@ static int snd_mpu401_create(int dev, snd_card_t **rcard)
77 strcat(card->longname, "polled"); 77 strcat(card->longname, "polled");
78 } 78 }
79 79
80 if (snd_mpu401_uart_new(card, 0, 80 if ((err = snd_mpu401_uart_new(card, 0,
81 MPU401_HW_MPU401, 81 MPU401_HW_MPU401,
82 port[dev], 0, 82 port[dev], 0,
83 irq[dev], irq[dev] >= 0 ? SA_INTERRUPT : 0, NULL) < 0) { 83 irq[dev], irq[dev] >= 0 ? SA_INTERRUPT : 0, NULL)) < 0) {
84 printk(KERN_ERR "MPU401 not detected at 0x%lx\n", port[dev]); 84 printk(KERN_ERR "MPU401 not detected at 0x%lx\n", port[dev]);
85 snd_card_free(card); 85 goto _err;
86 return -ENODEV;
87 }
88 if ((err = snd_card_register(card)) < 0) {
89 snd_card_free(card);
90 return err;
91 } 86 }
87
88 if ((err = snd_card_set_generic_dev(card)) < 0)
89 goto _err;
90
91 if ((err = snd_card_register(card)) < 0)
92 goto _err;
93
92 *rcard = card; 94 *rcard = card;
93 return 0; 95 return 0;
96
97 _err:
98 snd_card_free(card);
99 return err;
94} 100}
95 101
96static int __devinit snd_mpu401_probe(int dev) 102static int __devinit snd_mpu401_probe(int dev)