diff options
author | Takashi Iwai <tiwai@suse.de> | 2006-01-04 09:06:44 -0500 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-01-22 10:23:48 -0500 |
commit | 59b1b34f47e6c8ac8f00660db2cd34216819b400 (patch) | |
tree | 5422f5f889696e4896e5c44a26b9c021fe8a47fb /sound/isa/es18xx.c | |
parent | d82ed2ffc2839413c20b41a271a4d8db12b0683c (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/es18xx.c')
-rw-r--r-- | sound/isa/es18xx.c | 6 |
1 files changed, 5 insertions, 1 deletions
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 |