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/cs423x/cs4236.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/cs423x/cs4236.c')
-rw-r--r-- | sound/isa/cs423x/cs4236.c | 7 |
1 files changed, 7 insertions, 0 deletions
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"); |