Commit 92bac0c5 authored by Jaroslav Kysela's avatar Jaroslav Kysela

ALSA update

  - ISA PnP drivers - fixed failure path (missing pnp_unregister_card_driver() call)
parent d55d7cdf
/* include/version.h. Generated by configure. */ /* include/version.h. Generated by configure. */
#define CONFIG_SND_VERSION "0.9.2" #define CONFIG_SND_VERSION "0.9.2"
#define CONFIG_SND_DATE " (Thu Mar 20 13:31:57 2003 UTC)" #define CONFIG_SND_DATE " (Fri Apr 11 07:44:21 2003 UTC)"
...@@ -307,8 +307,10 @@ static int __init alsa_card_ad1816a_init(void) ...@@ -307,8 +307,10 @@ static int __init alsa_card_ad1816a_init(void)
cards += pnp_register_card_driver(&ad1816a_pnpc_driver); cards += pnp_register_card_driver(&ad1816a_pnpc_driver);
#ifdef MODULE #ifdef MODULE
if (!cards) if (!cards) {
pnp_unregister_card_driver(&ad1816a_pnpc_driver);
printk(KERN_ERR "no AD1816A based soundcards found.\n"); printk(KERN_ERR "no AD1816A based soundcards found.\n");
}
#endif /* MODULE */ #endif /* MODULE */
return cards ? 0 : -ENODEV; return cards ? 0 : -ENODEV;
} }
......
...@@ -328,8 +328,10 @@ static int __init alsa_card_als100_init(void) ...@@ -328,8 +328,10 @@ static int __init alsa_card_als100_init(void)
cards += pnp_register_card_driver(&als100_pnpc_driver); cards += pnp_register_card_driver(&als100_pnpc_driver);
#ifdef MODULE #ifdef MODULE
if (!cards) if (!cards) {
pnp_unregister_card_driver(&als100_pnpc_driver);
snd_printk(KERN_ERR "no ALS100 based soundcards found\n"); snd_printk(KERN_ERR "no ALS100 based soundcards found\n");
}
#endif #endif
return cards ? 0 : -ENODEV; return cards ? 0 : -ENODEV;
} }
......
...@@ -365,8 +365,10 @@ static int __init alsa_card_azt2320_init(void) ...@@ -365,8 +365,10 @@ static int __init alsa_card_azt2320_init(void)
cards += pnp_register_card_driver(&azt2320_pnpc_driver); cards += pnp_register_card_driver(&azt2320_pnpc_driver);
#ifdef MODULE #ifdef MODULE
if (!cards) if (!cards) {
pnp_unregister_card_driver(&azt2320_pnpc_driver);
snd_printk(KERN_ERR "no AZT2320 based soundcards found\n"); snd_printk(KERN_ERR "no AZT2320 based soundcards found\n");
}
#endif #endif
return cards ? 0 : -ENODEV; return cards ? 0 : -ENODEV;
} }
......
...@@ -613,6 +613,9 @@ static int __init alsa_card_cmi8330_init(void) ...@@ -613,6 +613,9 @@ static int __init alsa_card_cmi8330_init(void)
#endif #endif
if (!cards) { if (!cards) {
#ifdef CONFIG_PNP
pnp_unregister_card_driver(&cmi8330_pnpc_driver);
#endif
#ifdef MODULE #ifdef MODULE
snd_printk(KERN_ERR "CMI8330 not found or device busy\n"); snd_printk(KERN_ERR "CMI8330 not found or device busy\n");
#endif #endif
......
...@@ -590,6 +590,9 @@ static int __init alsa_card_cs423x_init(void) ...@@ -590,6 +590,9 @@ static int __init alsa_card_cs423x_init(void)
cards += pnp_register_card_driver(&cs423x_pnpc_driver); cards += pnp_register_card_driver(&cs423x_pnpc_driver);
#endif #endif
if (!cards) { if (!cards) {
#ifdef CONFIG_PNP
pnp_unregister_card_driver(&cs423x_pnpc_driver);
#endif
#ifdef MODULE #ifdef MODULE
printk(KERN_ERR IDENT " soundcard not found or device busy\n"); printk(KERN_ERR IDENT " soundcard not found or device busy\n");
#endif #endif
......
...@@ -2243,6 +2243,9 @@ static int __init alsa_card_es18xx_init(void) ...@@ -2243,6 +2243,9 @@ static int __init alsa_card_es18xx_init(void)
cards += pnp_register_card_driver(&es18xx_pnpc_driver); cards += pnp_register_card_driver(&es18xx_pnpc_driver);
#endif #endif
if(!cards) { if(!cards) {
#ifdef CONFIG_PNP
pnp_unregister_card_driver(&es18xx_pnpc_driver);
#endif
#ifdef MODULE #ifdef MODULE
snd_printk(KERN_ERR "ESS AudioDrive ES18xx soundcard not found or device busy\n"); snd_printk(KERN_ERR "ESS AudioDrive ES18xx soundcard not found or device busy\n");
#endif #endif
......
...@@ -945,6 +945,9 @@ static int __init alsa_card_interwave_init(void) ...@@ -945,6 +945,9 @@ static int __init alsa_card_interwave_init(void)
#endif #endif
if (!cards) { if (!cards) {
#ifdef CONFIG_PNP
pnp_unregister_card_driver(&interwave_pnpc_driver);
#endif
#ifdef MODULE #ifdef MODULE
printk(KERN_ERR "InterWave soundcard not found or device busy\n"); printk(KERN_ERR "InterWave soundcard not found or device busy\n");
#endif #endif
......
...@@ -893,6 +893,9 @@ static int __init alsa_card_opl3sa2_init(void) ...@@ -893,6 +893,9 @@ static int __init alsa_card_opl3sa2_init(void)
if (!cards) { if (!cards) {
#ifdef MODULE #ifdef MODULE
snd_printk(KERN_ERR "Yamaha OPL3-SA soundcard not found or device busy\n"); snd_printk(KERN_ERR "Yamaha OPL3-SA soundcard not found or device busy\n");
#endif
#ifdef CONFIG_PNP
pnp_unregister_card_driver(&opl3sa2_pnpc_driver);
#endif #endif
return -ENODEV; return -ENODEV;
} }
......
...@@ -1945,7 +1945,7 @@ static int __devinit snd_card_opti9xx_probe(struct pnp_card_link *pcard, ...@@ -1945,7 +1945,7 @@ static int __devinit snd_card_opti9xx_probe(struct pnp_card_link *pcard,
chip = (opti9xx_t *)card->private_data; chip = (opti9xx_t *)card->private_data;
#ifdef CONFIG_PNP #ifdef CONFIG_PNP
if (isapnp && (hw = snd_card_opti9xx_pnp(chip, pcard, pid)) > 0) { if (isapnp && pcard && (hw = snd_card_opti9xx_pnp(chip, pcard, pid)) > 0) {
switch (hw) { switch (hw) {
case 0x0924: case 0x0924:
hw = OPTi9XX_HW_82C924; hw = OPTi9XX_HW_82C924;
...@@ -2202,6 +2202,9 @@ static int __init alsa_card_opti9xx_init(void) ...@@ -2202,6 +2202,9 @@ static int __init alsa_card_opti9xx_init(void)
cards = pnp_register_card_driver(&opti9xx_pnpc_driver); cards = pnp_register_card_driver(&opti9xx_pnpc_driver);
if (cards == 0 && (error = snd_card_opti9xx_probe(NULL, NULL)) < 0) { if (cards == 0 && (error = snd_card_opti9xx_probe(NULL, NULL)) < 0) {
#ifdef CONFIG_PNP
pnp_unregister_card_driver(&opti9xx_pnpc_driver);
#endif
#ifdef MODULE #ifdef MODULE
#ifdef OPTi93X #ifdef OPTi93X
printk(KERN_ERR "no OPTi 82C93x soundcard found\n"); printk(KERN_ERR "no OPTi 82C93x soundcard found\n");
......
...@@ -224,10 +224,13 @@ static struct pnp_card_driver es968_pnpc_driver = { ...@@ -224,10 +224,13 @@ static struct pnp_card_driver es968_pnpc_driver = {
static int __init alsa_card_es968_init(void) static int __init alsa_card_es968_init(void)
{ {
int res = pnp_register_card_driver(&es968_pnpc_driver); int res = pnp_register_card_driver(&es968_pnpc_driver);
#ifdef MODULE
if (res == 0) if (res == 0)
{
pnp_unregister_card_driver(&es968_pnpc_driver);
#ifdef MODULE
snd_printk(KERN_ERR "no ES968 based soundcards found\n"); snd_printk(KERN_ERR "no ES968 based soundcards found\n");
#endif #endif
}
return res < 0 ? res : 0; return res < 0 ? res : 0;
} }
......
...@@ -625,6 +625,9 @@ static int __init alsa_card_sb16_init(void) ...@@ -625,6 +625,9 @@ static int __init alsa_card_sb16_init(void)
#endif #endif
if (!cards) { if (!cards) {
#ifdef CONFIG_PNP
pnp_unregister_card_driver(&sb16_pnpc_driver);
#endif
#ifdef MODULE #ifdef MODULE
snd_printk(KERN_ERR "Sound Blaster 16 soundcard not found or device busy\n"); snd_printk(KERN_ERR "Sound Blaster 16 soundcard not found or device busy\n");
#ifdef SNDRV_SBAWE_EMU8000 #ifdef SNDRV_SBAWE_EMU8000
......
...@@ -709,6 +709,9 @@ static int __init alsa_card_wavefront_init(void) ...@@ -709,6 +709,9 @@ static int __init alsa_card_wavefront_init(void)
cards += pnp_register_card_driver(&wavefront_pnpc_driver); cards += pnp_register_card_driver(&wavefront_pnpc_driver);
#endif #endif
if (!cards) { if (!cards) {
#ifdef CONFIG_PNP
pnp_unregister_card_driver(&wavefront_pnpc_driver);
#endif
#ifdef MODULE #ifdef MODULE
printk (KERN_ERR "No WaveFront cards found or devices busy\n"); printk (KERN_ERR "No WaveFront cards found or devices busy\n");
#endif #endif
...@@ -721,7 +724,9 @@ static void __exit alsa_card_wavefront_exit(void) ...@@ -721,7 +724,9 @@ static void __exit alsa_card_wavefront_exit(void)
{ {
int idx; int idx;
#ifdef CONFIG_PNP
pnp_unregister_card_driver(&wavefront_pnpc_driver); pnp_unregister_card_driver(&wavefront_pnpc_driver);
#endif
for (idx = 0; idx < SNDRV_CARDS; idx++) for (idx = 0; idx < SNDRV_CARDS; idx++)
snd_card_free(snd_wavefront_legacy[idx]); snd_card_free(snd_wavefront_legacy[idx]);
} }
......
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