aboutsummaryrefslogtreecommitdiffstats
path: root/sound/isa/cs423x/cs4236.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/isa/cs423x/cs4236.c')
-rw-r--r--sound/isa/cs423x/cs4236.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/sound/isa/cs423x/cs4236.c b/sound/isa/cs423x/cs4236.c
index e1683337e6cd..4fa431040564 100644
--- a/sound/isa/cs423x/cs4236.c
+++ b/sound/isa/cs423x/cs4236.c
@@ -75,8 +75,10 @@ MODULE_SUPPORTED_DEVICE("{{Crystal Semiconductors,CS4235},"
75 75
76#ifdef CS4232 76#ifdef CS4232
77#define IDENT "CS4232" 77#define IDENT "CS4232"
78#define CS423X_DRIVER "snd_cs4232"
78#else 79#else
79#define IDENT "CS4236+" 80#define IDENT "CS4236+"
81#define CS423X_DRIVER "snd_cs4236"
80#endif 82#endif
81 83
82static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */ 84static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */
@@ -125,10 +127,12 @@ module_param_array(dma2, int, NULL, 0444);
125MODULE_PARM_DESC(dma2, "DMA2 # for " IDENT " driver."); 127MODULE_PARM_DESC(dma2, "DMA2 # for " IDENT " driver.");
126 128
127static struct platform_device *platform_devices[SNDRV_CARDS]; 129static struct platform_device *platform_devices[SNDRV_CARDS];
130#ifdef CONFIG_PNP
128static int pnpc_registered; 131static int pnpc_registered;
129#ifdef CS4232 132#ifdef CS4232
130static int pnp_registered; 133static int pnp_registered;
131#endif 134#endif
135#endif /* CONFIG_PNP */
132 136
133struct snd_card_cs4236 { 137struct snd_card_cs4236 {
134 struct snd_cs4231 *chip; 138 struct snd_cs4231 *chip;
@@ -158,7 +162,6 @@ MODULE_DEVICE_TABLE(pnp, snd_cs4232_pnpbiosids);
158#endif /* CS4232 */ 162#endif /* CS4232 */
159 163
160#ifdef CS4232 164#ifdef CS4232
161#define CS423X_DRIVER "snd_cs4232"
162#define CS423X_ISAPNP_DRIVER "cs4232_isapnp" 165#define CS423X_ISAPNP_DRIVER "cs4232_isapnp"
163static struct pnp_card_device_id snd_cs423x_pnpids[] = { 166static struct pnp_card_device_id snd_cs423x_pnpids[] = {
164 /* Philips PCA70PS */ 167 /* Philips PCA70PS */
@@ -175,11 +178,12 @@ static struct pnp_card_device_id snd_cs423x_pnpids[] = {
175 { .id = "CSC7632", .devs = { { "CSC0000" }, { "CSC0010" }, { "PNPb006" } } }, 178 { .id = "CSC7632", .devs = { { "CSC0000" }, { "CSC0010" }, { "PNPb006" } } },
176 /* SIC CrystalWave 32 (CS4232) */ 179 /* SIC CrystalWave 32 (CS4232) */
177 { .id = "CSCf032", .devs = { { "CSC0000" }, { "CSC0010" }, { "CSC0003" } } }, 180 { .id = "CSCf032", .devs = { { "CSC0000" }, { "CSC0010" }, { "CSC0003" } } },
181 /* Netfinity 3000 on-board soundcard */
182 { .id = "CSCe825", .devs = { { "CSC0100" }, { "CSC0110" }, { "CSC010f" } } },
178 /* --- */ 183 /* --- */
179 { .id = "" } /* end */ 184 { .id = "" } /* end */
180}; 185};
181#else /* CS4236 */ 186#else /* CS4236 */
182#define CS423X_DRIVER "snd_cs4236"
183#define CS423X_ISAPNP_DRIVER "cs4236_isapnp" 187#define CS423X_ISAPNP_DRIVER "cs4236_isapnp"
184static struct pnp_card_device_id snd_cs423x_pnpids[] = { 188static struct pnp_card_device_id snd_cs423x_pnpids[] = {
185 /* Intel Marlin Spike Motherboard - CS4235 */ 189 /* Intel Marlin Spike Motherboard - CS4235 */
@@ -747,12 +751,14 @@ static void __init_or_module snd_cs423x_unregister_all(void)
747{ 751{
748 int i; 752 int i;
749 753
754#ifdef CONFIG_PNP
750 if (pnpc_registered) 755 if (pnpc_registered)
751 pnp_unregister_card_driver(&cs423x_pnpc_driver); 756 pnp_unregister_card_driver(&cs423x_pnpc_driver);
752#ifdef CS4232 757#ifdef CS4232
753 if (pnp_registered) 758 if (pnp_registered)
754 pnp_unregister_driver(&cs4232_pnp_driver); 759 pnp_unregister_driver(&cs4232_pnp_driver);
755#endif 760#endif
761#endif /* CONFIG_PNP */
756 for (i = 0; i < ARRAY_SIZE(platform_devices); ++i) 762 for (i = 0; i < ARRAY_SIZE(platform_devices); ++i)
757 platform_device_unregister(platform_devices[i]); 763 platform_device_unregister(platform_devices[i]);
758 platform_driver_unregister(&cs423x_nonpnp_driver); 764 platform_driver_unregister(&cs423x_nonpnp_driver);
@@ -778,6 +784,7 @@ static int __init alsa_card_cs423x_init(void)
778 platform_devices[i] = device; 784 platform_devices[i] = device;
779 cards++; 785 cards++;
780 } 786 }
787#ifdef CONFIG_PNP
781#ifdef CS4232 788#ifdef CS4232
782 i = pnp_register_driver(&cs4232_pnp_driver); 789 i = pnp_register_driver(&cs4232_pnp_driver);
783 if (i >= 0) { 790 if (i >= 0) {
@@ -790,6 +797,8 @@ static int __init alsa_card_cs423x_init(void)
790 pnpc_registered = 1; 797 pnpc_registered = 1;
791 cards += i; 798 cards += i;
792 } 799 }
800#endif /* CONFIG_PNP */
801
793 if (!cards) { 802 if (!cards) {
794#ifdef MODULE 803#ifdef MODULE
795 printk(KERN_ERR IDENT " soundcard not found or device busy\n"); 804 printk(KERN_ERR IDENT " soundcard not found or device busy\n");