aboutsummaryrefslogtreecommitdiffstats
path: root/sound/isa/opl3sa2.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2006-01-04 09:06:44 -0500
committerJaroslav Kysela <perex@suse.cz>2006-01-22 10:23:48 -0500
commit59b1b34f47e6c8ac8f00660db2cd34216819b400 (patch)
tree5422f5f889696e4896e5c44a26b9c021fe8a47fb /sound/isa/opl3sa2.c
parentd82ed2ffc2839413c20b41a271a4d8db12b0683c (diff)
[ALSA] Fix compilation without CONFIG_PNP
Fix compilation of some ISA drivers without CONFIG_PNP. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/isa/opl3sa2.c')
-rw-r--r--sound/isa/opl3sa2.c6
1 files changed, 6 insertions, 0 deletions
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);
91MODULE_PARM_DESC(opl3sa3_ymode, "Speaker size selection for 3D Enhancement mode: Desktop/Large Notebook/Small Notebook/HiFi."); 91MODULE_PARM_DESC(opl3sa3_ymode, "Speaker size selection for 3D Enhancement mode: Desktop/Large Notebook/Small Notebook/HiFi.");
92 92
93static struct platform_device *platform_devices[SNDRV_CARDS]; 93static struct platform_device *platform_devices[SNDRV_CARDS];
94#ifdef CONFIG_PNP
94static int pnp_registered; 95static int pnp_registered;
95static int pnpc_registered; 96static 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