diff options
author | Takashi Iwai <tiwai@suse.de> | 2005-09-05 11:19:20 -0400 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2005-09-12 04:42:01 -0400 |
commit | 43bcd973d6d05d16b876e09dcc49a09d3e48e88d (patch) | |
tree | 8c8493b66c417402f6188051c57e55099bbd156d /sound/isa/sscape.c | |
parent | 16dab54b8cbac39bd3f639db5d7d0fd8300a6cb0 (diff) |
[ALSA] Add snd_card_set_generic_dev() call to ISA drivers
ISA,CMI8330 driver,ES18xx driver,OPL3SA2 driver,Sound Galaxy driver
Sound Scape driver,AD1848 driver,CS4231 driver,CS4236+ driver
ES1688 driver,GUS Classic driver,GUS Extreme driver,GUS MAX driver
AMD InterWave driver,Opti9xx drivers,SB16/AWE driver,SB8 driver
Wavefront drivers
- 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/isa/sscape.c')
-rw-r--r-- | sound/isa/sscape.c | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/sound/isa/sscape.c b/sound/isa/sscape.c index 3959ed694eec..9f6b58c79209 100644 --- a/sound/isa/sscape.c +++ b/sound/isa/sscape.c | |||
@@ -1262,11 +1262,6 @@ static int __devinit create_sscape(const struct params *params, snd_card_t **rca | |||
1262 | */ | 1262 | */ |
1263 | sscape_write(sscape, GA_INTENA_REG, 0x80); | 1263 | sscape_write(sscape, GA_INTENA_REG, 0x80); |
1264 | 1264 | ||
1265 | if ((err = snd_card_register(card)) < 0) { | ||
1266 | printk(KERN_ERR "sscape: Failed to register sound card\n"); | ||
1267 | goto _release_card; | ||
1268 | } | ||
1269 | |||
1270 | /* | 1265 | /* |
1271 | * Initialize mixer | 1266 | * Initialize mixer |
1272 | */ | 1267 | */ |
@@ -1396,6 +1391,13 @@ static int __devinit sscape_pnp_detect(struct pnp_card_link *pcard, | |||
1396 | if (ret < 0) | 1391 | if (ret < 0) |
1397 | return ret; | 1392 | return ret; |
1398 | snd_card_set_dev(card, &pcard->card->dev); | 1393 | snd_card_set_dev(card, &pcard->card->dev); |
1394 | |||
1395 | if ((ret = snd_card_register(card)) < 0) { | ||
1396 | printk(KERN_ERR "sscape: Failed to register sound card\n"); | ||
1397 | snd_card_free(card); | ||
1398 | return ret; | ||
1399 | } | ||
1400 | |||
1399 | pnp_set_card_drvdata(pcard, card); | 1401 | pnp_set_card_drvdata(pcard, card); |
1400 | ++sscape_cards; | 1402 | ++sscape_cards; |
1401 | ++idx; | 1403 | ++idx; |
@@ -1460,6 +1462,16 @@ static int __init sscape_manual_probe(struct params *params) | |||
1460 | if (ret < 0) | 1462 | if (ret < 0) |
1461 | return ret; | 1463 | return ret; |
1462 | 1464 | ||
1465 | if ((ret = snd_card_set_generic_dev(card)) < 0) { | ||
1466 | snd_card_free(card); | ||
1467 | return ret; | ||
1468 | } | ||
1469 | if ((ret = snd_card_register(card)) < 0) { | ||
1470 | printk(KERN_ERR "sscape: Failed to register sound card\n"); | ||
1471 | snd_card_free(card); | ||
1472 | return ret; | ||
1473 | } | ||
1474 | |||
1463 | sscape_card[sscape_cards] = card; | 1475 | sscape_card[sscape_cards] = card; |
1464 | params++; | 1476 | params++; |
1465 | sscape_cards++; | 1477 | sscape_cards++; |