diff options
Diffstat (limited to 'sound/isa')
-rw-r--r-- | sound/isa/cmi8330.c | 6 | ||||
-rw-r--r-- | sound/isa/cs423x/cs4236.c | 7 | ||||
-rw-r--r-- | sound/isa/es18xx.c | 6 | ||||
-rw-r--r-- | sound/isa/opl3sa2.c | 6 | ||||
-rw-r--r-- | sound/isa/sscape.c | 6 | ||||
-rw-r--r-- | sound/isa/wavefront/wavefront.c | 7 |
6 files changed, 34 insertions, 4 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 |
diff --git a/sound/isa/cs423x/cs4236.c b/sound/isa/cs423x/cs4236.c index e1683337e6cd..2bfa68b01fe4 100644 --- a/sound/isa/cs423x/cs4236.c +++ b/sound/isa/cs423x/cs4236.c | |||
@@ -125,10 +125,12 @@ module_param_array(dma2, int, NULL, 0444); | |||
125 | MODULE_PARM_DESC(dma2, "DMA2 # for " IDENT " driver."); | 125 | MODULE_PARM_DESC(dma2, "DMA2 # for " IDENT " driver."); |
126 | 126 | ||
127 | static struct platform_device *platform_devices[SNDRV_CARDS]; | 127 | static struct platform_device *platform_devices[SNDRV_CARDS]; |
128 | #ifdef CONFIG_PNP | ||
128 | static int pnpc_registered; | 129 | static int pnpc_registered; |
129 | #ifdef CS4232 | 130 | #ifdef CS4232 |
130 | static int pnp_registered; | 131 | static int pnp_registered; |
131 | #endif | 132 | #endif |
133 | #endif /* CONFIG_PNP */ | ||
132 | 134 | ||
133 | struct snd_card_cs4236 { | 135 | struct snd_card_cs4236 { |
134 | struct snd_cs4231 *chip; | 136 | struct snd_cs4231 *chip; |
@@ -747,12 +749,14 @@ static void __init_or_module snd_cs423x_unregister_all(void) | |||
747 | { | 749 | { |
748 | int i; | 750 | int i; |
749 | 751 | ||
752 | #ifdef CONFIG_PNP | ||
750 | if (pnpc_registered) | 753 | if (pnpc_registered) |
751 | pnp_unregister_card_driver(&cs423x_pnpc_driver); | 754 | pnp_unregister_card_driver(&cs423x_pnpc_driver); |
752 | #ifdef CS4232 | 755 | #ifdef CS4232 |
753 | if (pnp_registered) | 756 | if (pnp_registered) |
754 | pnp_unregister_driver(&cs4232_pnp_driver); | 757 | pnp_unregister_driver(&cs4232_pnp_driver); |
755 | #endif | 758 | #endif |
759 | #endif /* CONFIG_PNP */ | ||
756 | for (i = 0; i < ARRAY_SIZE(platform_devices); ++i) | 760 | for (i = 0; i < ARRAY_SIZE(platform_devices); ++i) |
757 | platform_device_unregister(platform_devices[i]); | 761 | platform_device_unregister(platform_devices[i]); |
758 | platform_driver_unregister(&cs423x_nonpnp_driver); | 762 | platform_driver_unregister(&cs423x_nonpnp_driver); |
@@ -778,6 +782,7 @@ static int __init alsa_card_cs423x_init(void) | |||
778 | platform_devices[i] = device; | 782 | platform_devices[i] = device; |
779 | cards++; | 783 | cards++; |
780 | } | 784 | } |
785 | #ifdef CONFIG_PNP | ||
781 | #ifdef CS4232 | 786 | #ifdef CS4232 |
782 | i = pnp_register_driver(&cs4232_pnp_driver); | 787 | i = pnp_register_driver(&cs4232_pnp_driver); |
783 | if (i >= 0) { | 788 | if (i >= 0) { |
@@ -790,6 +795,8 @@ static int __init alsa_card_cs423x_init(void) | |||
790 | pnpc_registered = 1; | 795 | pnpc_registered = 1; |
791 | cards += i; | 796 | cards += i; |
792 | } | 797 | } |
798 | #endif /* CONFIG_PNP */ | ||
799 | |||
793 | if (!cards) { | 800 | if (!cards) { |
794 | #ifdef MODULE | 801 | #ifdef MODULE |
795 | printk(KERN_ERR IDENT " soundcard not found or device busy\n"); | 802 | printk(KERN_ERR IDENT " soundcard not found or device busy\n"); |
diff --git a/sound/isa/es18xx.c b/sound/isa/es18xx.c index bf5de0782eb0..08f032b51107 100644 --- a/sound/isa/es18xx.c +++ b/sound/isa/es18xx.c | |||
@@ -1878,9 +1878,9 @@ module_param_array(dma2, int, NULL, 0444); | |||
1878 | MODULE_PARM_DESC(dma2, "DMA 2 # for ES18xx driver."); | 1878 | MODULE_PARM_DESC(dma2, "DMA 2 # for ES18xx driver."); |
1879 | 1879 | ||
1880 | static struct platform_device *platform_devices[SNDRV_CARDS]; | 1880 | static struct platform_device *platform_devices[SNDRV_CARDS]; |
1881 | static int pnp_registered; | ||
1882 | 1881 | ||
1883 | #ifdef CONFIG_PNP | 1882 | #ifdef CONFIG_PNP |
1883 | static int pnp_registered; | ||
1884 | 1884 | ||
1885 | static struct pnp_card_device_id snd_audiodrive_pnpids[] = { | 1885 | static struct pnp_card_device_id snd_audiodrive_pnpids[] = { |
1886 | /* ESS 1868 (integrated on Compaq dual P-Pro motherboard and Genius 18PnP 3D) */ | 1886 | /* ESS 1868 (integrated on Compaq dual P-Pro motherboard and Genius 18PnP 3D) */ |
@@ -2209,8 +2209,10 @@ static void __init_or_module snd_es18xx_unregister_all(void) | |||
2209 | { | 2209 | { |
2210 | int i; | 2210 | int i; |
2211 | 2211 | ||
2212 | #ifdef CONFIG_PNP | ||
2212 | if (pnp_registered) | 2213 | if (pnp_registered) |
2213 | pnp_unregister_card_driver(&es18xx_pnpc_driver); | 2214 | pnp_unregister_card_driver(&es18xx_pnpc_driver); |
2215 | #endif | ||
2214 | for (i = 0; i < ARRAY_SIZE(platform_devices); ++i) | 2216 | for (i = 0; i < ARRAY_SIZE(platform_devices); ++i) |
2215 | platform_device_unregister(platform_devices[i]); | 2217 | platform_device_unregister(platform_devices[i]); |
2216 | platform_driver_unregister(&snd_es18xx_nonpnp_driver); | 2218 | platform_driver_unregister(&snd_es18xx_nonpnp_driver); |
@@ -2237,11 +2239,13 @@ static int __init alsa_card_es18xx_init(void) | |||
2237 | cards++; | 2239 | cards++; |
2238 | } | 2240 | } |
2239 | 2241 | ||
2242 | #ifdef CONFIG_PNP | ||
2240 | i = pnp_register_card_driver(&es18xx_pnpc_driver); | 2243 | i = pnp_register_card_driver(&es18xx_pnpc_driver); |
2241 | if (i >= 0) { | 2244 | if (i >= 0) { |
2242 | pnp_registered = 1; | 2245 | pnp_registered = 1; |
2243 | cards += i; | 2246 | cards += i; |
2244 | } | 2247 | } |
2248 | #endif | ||
2245 | 2249 | ||
2246 | if(!cards) { | 2250 | if(!cards) { |
2247 | #ifdef MODULE | 2251 | #ifdef MODULE |
diff --git a/sound/isa/opl3sa2.c b/sound/isa/opl3sa2.c index ca359e0c674b..84ffa8f0f26d 100644 --- a/sound/isa/opl3sa2.c +++ b/sound/isa/opl3sa2.c | |||
@@ -91,8 +91,10 @@ module_param_array(opl3sa3_ymode, int, NULL, 0444); | |||
91 | MODULE_PARM_DESC(opl3sa3_ymode, "Speaker size selection for 3D Enhancement mode: Desktop/Large Notebook/Small Notebook/HiFi."); | 91 | MODULE_PARM_DESC(opl3sa3_ymode, "Speaker size selection for 3D Enhancement mode: Desktop/Large Notebook/Small Notebook/HiFi."); |
92 | 92 | ||
93 | static struct platform_device *platform_devices[SNDRV_CARDS]; | 93 | static struct platform_device *platform_devices[SNDRV_CARDS]; |
94 | #ifdef CONFIG_PNP | ||
94 | static int pnp_registered; | 95 | static int pnp_registered; |
95 | static int pnpc_registered; | 96 | static int pnpc_registered; |
97 | #endif | ||
96 | 98 | ||
97 | /* control ports */ | 99 | /* control ports */ |
98 | #define OPL3SA2_PM_CTRL 0x01 | 100 | #define OPL3SA2_PM_CTRL 0x01 |
@@ -929,10 +931,12 @@ static void __init_or_module snd_opl3sa2_unregister_all(void) | |||
929 | { | 931 | { |
930 | int i; | 932 | int i; |
931 | 933 | ||
934 | #ifdef CONFIG_PNP | ||
932 | if (pnpc_registered) | 935 | if (pnpc_registered) |
933 | pnp_unregister_card_driver(&opl3sa2_pnpc_driver); | 936 | pnp_unregister_card_driver(&opl3sa2_pnpc_driver); |
934 | if (pnp_registered) | 937 | if (pnp_registered) |
935 | pnp_unregister_driver(&opl3sa2_pnp_driver); | 938 | pnp_unregister_driver(&opl3sa2_pnp_driver); |
939 | #endif | ||
936 | for (i = 0; i < ARRAY_SIZE(platform_devices); ++i) | 940 | for (i = 0; i < ARRAY_SIZE(platform_devices); ++i) |
937 | platform_device_unregister(platform_devices[i]); | 941 | platform_device_unregister(platform_devices[i]); |
938 | platform_driver_unregister(&snd_opl3sa2_nonpnp_driver); | 942 | platform_driver_unregister(&snd_opl3sa2_nonpnp_driver); |
@@ -961,6 +965,7 @@ static int __init alsa_card_opl3sa2_init(void) | |||
961 | cards++; | 965 | cards++; |
962 | } | 966 | } |
963 | 967 | ||
968 | #ifdef CONFIG_PNP | ||
964 | err = pnp_register_driver(&opl3sa2_pnp_driver); | 969 | err = pnp_register_driver(&opl3sa2_pnp_driver); |
965 | if (err >= 0) { | 970 | if (err >= 0) { |
966 | pnp_registered = 1; | 971 | pnp_registered = 1; |
@@ -971,6 +976,7 @@ static int __init alsa_card_opl3sa2_init(void) | |||
971 | pnpc_registered = 1; | 976 | pnpc_registered = 1; |
972 | cards += err; | 977 | cards += err; |
973 | } | 978 | } |
979 | #endif | ||
974 | 980 | ||
975 | if (!cards) { | 981 | if (!cards) { |
976 | #ifdef MODULE | 982 | #ifdef MODULE |
diff --git a/sound/isa/sscape.c b/sound/isa/sscape.c index 5fb981c0a281..29bba8cc3ef3 100644 --- a/sound/isa/sscape.c +++ b/sound/isa/sscape.c | |||
@@ -69,9 +69,9 @@ module_param_array(dma, int, NULL, 0444); | |||
69 | MODULE_PARM_DESC(dma, "DMA # for SoundScape driver."); | 69 | MODULE_PARM_DESC(dma, "DMA # for SoundScape driver."); |
70 | 70 | ||
71 | static struct platform_device *platform_devices[SNDRV_CARDS]; | 71 | static struct platform_device *platform_devices[SNDRV_CARDS]; |
72 | static int pnp_registered; | ||
73 | 72 | ||
74 | #ifdef CONFIG_PNP | 73 | #ifdef CONFIG_PNP |
74 | static int pnp_registered; | ||
75 | static struct pnp_card_device_id sscape_pnpids[] = { | 75 | static struct pnp_card_device_id sscape_pnpids[] = { |
76 | { .id = "ENS3081", .devs = { { "ENS0000" } } }, | 76 | { .id = "ENS3081", .devs = { { "ENS0000" } } }, |
77 | { .id = "" } /* end */ | 77 | { .id = "" } /* end */ |
@@ -1391,8 +1391,10 @@ static void __init_or_module sscape_unregister_all(void) | |||
1391 | { | 1391 | { |
1392 | int i; | 1392 | int i; |
1393 | 1393 | ||
1394 | #ifdef CONFIG_PNP | ||
1394 | if (pnp_registered) | 1395 | if (pnp_registered) |
1395 | pnp_unregister_card_driver(&sscape_pnpc_driver); | 1396 | pnp_unregister_card_driver(&sscape_pnpc_driver); |
1397 | #endif | ||
1396 | for (i = 0; i < ARRAY_SIZE(platform_devices); ++i) | 1398 | for (i = 0; i < ARRAY_SIZE(platform_devices); ++i) |
1397 | platform_device_unregister(platform_devices[i]); | 1399 | platform_device_unregister(platform_devices[i]); |
1398 | platform_driver_unregister(&snd_sscape_driver); | 1400 | platform_driver_unregister(&snd_sscape_driver); |
@@ -1466,8 +1468,10 @@ static int __init sscape_init(void) | |||
1466 | ret = sscape_manual_probe(); | 1468 | ret = sscape_manual_probe(); |
1467 | if (ret < 0) | 1469 | if (ret < 0) |
1468 | return ret; | 1470 | return ret; |
1471 | #ifdef CONFIG_PNP | ||
1469 | if (pnp_register_card_driver(&sscape_pnpc_driver) >= 0) | 1472 | if (pnp_register_card_driver(&sscape_pnpc_driver) >= 0) |
1470 | pnp_registered = 1; | 1473 | pnp_registered = 1; |
1474 | #endif | ||
1471 | return 0; | 1475 | return 0; |
1472 | } | 1476 | } |
1473 | 1477 | ||
diff --git a/sound/isa/wavefront/wavefront.c b/sound/isa/wavefront/wavefront.c index a6dcb2f970ca..fa3ab960de17 100644 --- a/sound/isa/wavefront/wavefront.c +++ b/sound/isa/wavefront/wavefront.c | |||
@@ -84,10 +84,9 @@ module_param_array(use_cs4232_midi, bool, NULL, 0444); | |||
84 | MODULE_PARM_DESC(use_cs4232_midi, "Use CS4232 MPU-401 interface (inaccessibly located inside your computer)"); | 84 | MODULE_PARM_DESC(use_cs4232_midi, "Use CS4232 MPU-401 interface (inaccessibly located inside your computer)"); |
85 | 85 | ||
86 | static struct platform_device *platform_devices[SNDRV_CARDS]; | 86 | static struct platform_device *platform_devices[SNDRV_CARDS]; |
87 | static int pnp_registered; | ||
88 | |||
89 | 87 | ||
90 | #ifdef CONFIG_PNP | 88 | #ifdef CONFIG_PNP |
89 | static int pnp_registered; | ||
91 | 90 | ||
92 | static struct pnp_card_device_id snd_wavefront_pnpids[] = { | 91 | static struct pnp_card_device_id snd_wavefront_pnpids[] = { |
93 | /* Tropez */ | 92 | /* Tropez */ |
@@ -695,8 +694,10 @@ static void __init_or_module snd_wavefront_unregister_all(void) | |||
695 | { | 694 | { |
696 | int i; | 695 | int i; |
697 | 696 | ||
697 | #ifdef CONFIG_PNP | ||
698 | if (pnp_registered) | 698 | if (pnp_registered) |
699 | pnp_unregister_card_driver(&wavefront_pnpc_driver); | 699 | pnp_unregister_card_driver(&wavefront_pnpc_driver); |
700 | #endif | ||
700 | for (i = 0; i < ARRAY_SIZE(platform_devices); ++i) | 701 | for (i = 0; i < ARRAY_SIZE(platform_devices); ++i) |
701 | platform_device_unregister(platform_devices[i]); | 702 | platform_device_unregister(platform_devices[i]); |
702 | platform_driver_unregister(&snd_wavefront_driver); | 703 | platform_driver_unregister(&snd_wavefront_driver); |
@@ -725,11 +726,13 @@ static int __init alsa_card_wavefront_init(void) | |||
725 | cards++; | 726 | cards++; |
726 | } | 727 | } |
727 | 728 | ||
729 | #ifdef CONFIG_PNP | ||
728 | i = pnp_register_card_driver(&wavefront_pnpc_driver); | 730 | i = pnp_register_card_driver(&wavefront_pnpc_driver); |
729 | if (i >= 0) { | 731 | if (i >= 0) { |
730 | pnp_registered = 1; | 732 | pnp_registered = 1; |
731 | cards += i; | 733 | cards += i; |
732 | } | 734 | } |
735 | #endif | ||
733 | 736 | ||
734 | if (!cards) { | 737 | if (!cards) { |
735 | #ifdef MODULE | 738 | #ifdef MODULE |