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. */
#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)
cards += pnp_register_card_driver(&ad1816a_pnpc_driver);
#ifdef MODULE
if (!cards)
if (!cards) {
pnp_unregister_card_driver(&ad1816a_pnpc_driver);
printk(KERN_ERR "no AD1816A based soundcards found.\n");
}
#endif /* MODULE */
return cards ? 0 : -ENODEV;
}
......
......@@ -328,8 +328,10 @@ static int __init alsa_card_als100_init(void)
cards += pnp_register_card_driver(&als100_pnpc_driver);
#ifdef MODULE
if (!cards)
if (!cards) {
pnp_unregister_card_driver(&als100_pnpc_driver);
snd_printk(KERN_ERR "no ALS100 based soundcards found\n");
}
#endif
return cards ? 0 : -ENODEV;
}
......
......@@ -365,8 +365,10 @@ static int __init alsa_card_azt2320_init(void)
cards += pnp_register_card_driver(&azt2320_pnpc_driver);
#ifdef MODULE
if (!cards)
if (!cards) {
pnp_unregister_card_driver(&azt2320_pnpc_driver);
snd_printk(KERN_ERR "no AZT2320 based soundcards found\n");
}
#endif
return cards ? 0 : -ENODEV;
}
......
......@@ -613,6 +613,9 @@ static int __init alsa_card_cmi8330_init(void)
#endif
if (!cards) {
#ifdef CONFIG_PNP
pnp_unregister_card_driver(&cmi8330_pnpc_driver);
#endif
#ifdef MODULE
snd_printk(KERN_ERR "CMI8330 not found or device busy\n");
#endif
......
......@@ -590,6 +590,9 @@ static int __init alsa_card_cs423x_init(void)
cards += pnp_register_card_driver(&cs423x_pnpc_driver);
#endif
if (!cards) {
#ifdef CONFIG_PNP
pnp_unregister_card_driver(&cs423x_pnpc_driver);
#endif
#ifdef MODULE
printk(KERN_ERR IDENT " soundcard not found or device busy\n");
#endif
......
......@@ -2243,6 +2243,9 @@ static int __init alsa_card_es18xx_init(void)
cards += pnp_register_card_driver(&es18xx_pnpc_driver);
#endif
if(!cards) {
#ifdef CONFIG_PNP
pnp_unregister_card_driver(&es18xx_pnpc_driver);
#endif
#ifdef MODULE
snd_printk(KERN_ERR "ESS AudioDrive ES18xx soundcard not found or device busy\n");
#endif
......
......@@ -945,6 +945,9 @@ static int __init alsa_card_interwave_init(void)
#endif
if (!cards) {
#ifdef CONFIG_PNP
pnp_unregister_card_driver(&interwave_pnpc_driver);
#endif
#ifdef MODULE
printk(KERN_ERR "InterWave soundcard not found or device busy\n");
#endif
......
......@@ -893,6 +893,9 @@ static int __init alsa_card_opl3sa2_init(void)
if (!cards) {
#ifdef MODULE
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
return -ENODEV;
}
......
......@@ -1945,7 +1945,7 @@ static int __devinit snd_card_opti9xx_probe(struct pnp_card_link *pcard,
chip = (opti9xx_t *)card->private_data;
#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) {
case 0x0924:
hw = OPTi9XX_HW_82C924;
......@@ -2202,6 +2202,9 @@ static int __init alsa_card_opti9xx_init(void)
cards = pnp_register_card_driver(&opti9xx_pnpc_driver);
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 OPTi93X
printk(KERN_ERR "no OPTi 82C93x soundcard found\n");
......
......@@ -224,10 +224,13 @@ static struct pnp_card_driver es968_pnpc_driver = {
static int __init alsa_card_es968_init(void)
{
int res = pnp_register_card_driver(&es968_pnpc_driver);
#ifdef MODULE
if (res == 0)
{
pnp_unregister_card_driver(&es968_pnpc_driver);
#ifdef MODULE
snd_printk(KERN_ERR "no ES968 based soundcards found\n");
#endif
}
return res < 0 ? res : 0;
}
......
......@@ -625,6 +625,9 @@ static int __init alsa_card_sb16_init(void)
#endif
if (!cards) {
#ifdef CONFIG_PNP
pnp_unregister_card_driver(&sb16_pnpc_driver);
#endif
#ifdef MODULE
snd_printk(KERN_ERR "Sound Blaster 16 soundcard not found or device busy\n");
#ifdef SNDRV_SBAWE_EMU8000
......
......@@ -709,6 +709,9 @@ static int __init alsa_card_wavefront_init(void)
cards += pnp_register_card_driver(&wavefront_pnpc_driver);
#endif
if (!cards) {
#ifdef CONFIG_PNP
pnp_unregister_card_driver(&wavefront_pnpc_driver);
#endif
#ifdef MODULE
printk (KERN_ERR "No WaveFront cards found or devices busy\n");
#endif
......@@ -721,7 +724,9 @@ static void __exit alsa_card_wavefront_exit(void)
{
int idx;
#ifdef CONFIG_PNP
pnp_unregister_card_driver(&wavefront_pnpc_driver);
#endif
for (idx = 0; idx < SNDRV_CARDS; 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