aboutsummaryrefslogtreecommitdiffstats
path: root/sound/isa/es18xx.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-17 00:21:33 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-17 00:21:33 -0400
commitb17bfca5f16a6090ee51250163e1720f6fe71515 (patch)
treeb5c561e1c2b7db6ded4c2092486f66f7c8c35902 /sound/isa/es18xx.c
parent36dbe4d6bffb90fcb2663ac50af00a942412e246 (diff)
parenta04395ead6d17c83da64264b6fe78f852a648202 (diff)
Merge branch 'linus' of master.kernel.org:/pub/scm/linux/kernel/git/perex/alsa
* 'linus' of master.kernel.org:/pub/scm/linux/kernel/git/perex/alsa: [ALSA] usbaudio - Coping with short replies in usbmixer [ALSA] Include quirks from Ubuntu Dapper/Edgy/Feisty [ALSA] Fix probe of non-PnP ISA devices [ALSA] version 1.0.14rc4 [ALSA] hda-codec - Fix ALC882/861VD codec support on some laptops [ALSA] ASoC AC97 device reg bugfix [ALSA] ASoC AC97 static GPL symbol fix [ALSA] hda-codec - Make the mixer capability check more robust [ALSA] usb-audio: another Logitech QuickCam ID
Diffstat (limited to 'sound/isa/es18xx.c')
-rw-r--r--sound/isa/es18xx.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/sound/isa/es18xx.c b/sound/isa/es18xx.c
index d2a9c7df0ce5..f7732bf90be3 100644
--- a/sound/isa/es18xx.c
+++ b/sound/isa/es18xx.c
@@ -2036,7 +2036,9 @@ module_param_array(dma2, int, NULL, 0444);
2036MODULE_PARM_DESC(dma2, "DMA 2 # for ES18xx driver."); 2036MODULE_PARM_DESC(dma2, "DMA 2 # for ES18xx driver.");
2037 2037
2038#ifdef CONFIG_PNP 2038#ifdef CONFIG_PNP
2039static int pnp_registered, pnpc_registered; 2039static int isa_registered;
2040static int pnp_registered;
2041static int pnpc_registered;
2040 2042
2041static struct pnp_device_id snd_audiodrive_pnpbiosids[] = { 2043static struct pnp_device_id snd_audiodrive_pnpbiosids[] = {
2042 { .id = "ESS1869" }, 2044 { .id = "ESS1869" },
@@ -2466,18 +2468,22 @@ static int __init alsa_card_es18xx_init(void)
2466 int err; 2468 int err;
2467 2469
2468 err = isa_register_driver(&snd_es18xx_isa_driver, SNDRV_CARDS); 2470 err = isa_register_driver(&snd_es18xx_isa_driver, SNDRV_CARDS);
2469 if (err < 0)
2470 return err;
2471
2472#ifdef CONFIG_PNP 2471#ifdef CONFIG_PNP
2472 if (!err)
2473 isa_registered = 1;
2474
2473 err = pnp_register_driver(&es18xx_pnp_driver); 2475 err = pnp_register_driver(&es18xx_pnp_driver);
2474 if (!err) 2476 if (!err)
2475 pnp_registered = 1; 2477 pnp_registered = 1;
2478
2476 err = pnp_register_card_driver(&es18xx_pnpc_driver); 2479 err = pnp_register_card_driver(&es18xx_pnpc_driver);
2477 if (!err) 2480 if (!err)
2478 pnpc_registered = 1; 2481 pnpc_registered = 1;
2482
2483 if (isa_registered || pnp_registered)
2484 err = 0;
2479#endif 2485#endif
2480 return 0; 2486 return err;
2481} 2487}
2482 2488
2483static void __exit alsa_card_es18xx_exit(void) 2489static void __exit alsa_card_es18xx_exit(void)
@@ -2487,8 +2493,9 @@ static void __exit alsa_card_es18xx_exit(void)
2487 pnp_unregister_card_driver(&es18xx_pnpc_driver); 2493 pnp_unregister_card_driver(&es18xx_pnpc_driver);
2488 if (pnp_registered) 2494 if (pnp_registered)
2489 pnp_unregister_driver(&es18xx_pnp_driver); 2495 pnp_unregister_driver(&es18xx_pnp_driver);
2496 if (isa_registered)
2490#endif 2497#endif
2491 isa_unregister_driver(&snd_es18xx_isa_driver); 2498 isa_unregister_driver(&snd_es18xx_isa_driver);
2492} 2499}
2493 2500
2494module_init(alsa_card_es18xx_init) 2501module_init(alsa_card_es18xx_init)