diff options
Diffstat (limited to 'sound/isa/cmi8330.c')
-rw-r--r-- | sound/isa/cmi8330.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sound/isa/cmi8330.c b/sound/isa/cmi8330.c index bd8e23818460..fd9bb2575de8 100644 --- a/sound/isa/cmi8330.c +++ b/sound/isa/cmi8330.c | |||
@@ -109,7 +109,9 @@ module_param_array(wssdma, int, NULL, 0444); | |||
109 | MODULE_PARM_DESC(wssdma, "DMA for CMI8330 WSS driver."); | 109 | MODULE_PARM_DESC(wssdma, "DMA for CMI8330 WSS driver."); |
110 | 110 | ||
111 | static struct platform_device *platform_devices[SNDRV_CARDS]; | 111 | static struct platform_device *platform_devices[SNDRV_CARDS]; |
112 | #ifdef CONFIG_PNP | ||
112 | static int pnp_registered; | 113 | static int pnp_registered; |
114 | #endif | ||
113 | 115 | ||
114 | #define CMI8330_RMUX3D 16 | 116 | #define CMI8330_RMUX3D 16 |
115 | #define CMI8330_MUTEMUX 17 | 117 | #define CMI8330_MUTEMUX 17 |
@@ -672,8 +674,10 @@ static void __init_or_module snd_cmi8330_unregister_all(void) | |||
672 | { | 674 | { |
673 | int i; | 675 | int i; |
674 | 676 | ||
677 | #ifdef CONFIG_PNP | ||
675 | if (pnp_registered) | 678 | if (pnp_registered) |
676 | pnp_unregister_card_driver(&cmi8330_pnpc_driver); | 679 | pnp_unregister_card_driver(&cmi8330_pnpc_driver); |
680 | #endif | ||
677 | for (i = 0; i < ARRAY_SIZE(platform_devices); ++i) | 681 | for (i = 0; i < ARRAY_SIZE(platform_devices); ++i) |
678 | platform_device_unregister(platform_devices[i]); | 682 | platform_device_unregister(platform_devices[i]); |
679 | platform_driver_unregister(&snd_cmi8330_driver); | 683 | platform_driver_unregister(&snd_cmi8330_driver); |
@@ -700,11 +704,13 @@ static int __init alsa_card_cmi8330_init(void) | |||
700 | cards++; | 704 | cards++; |
701 | } | 705 | } |
702 | 706 | ||
707 | #ifdef CONFIG_PNP | ||
703 | err = pnp_register_card_driver(&cmi8330_pnpc_driver); | 708 | err = pnp_register_card_driver(&cmi8330_pnpc_driver); |
704 | if (err >= 0) { | 709 | if (err >= 0) { |
705 | pnp_registered = 1; | 710 | pnp_registered = 1; |
706 | cards += err; | 711 | cards += err; |
707 | } | 712 | } |
713 | #endif | ||
708 | 714 | ||
709 | if (!cards) { | 715 | if (!cards) { |
710 | #ifdef MODULE | 716 | #ifdef MODULE |