Skip to contentSkip to conversation

snd-opti92x-{ad1848,cs4231} won't compile without CONFIG_PNP

PATCH Rene Herman 2 participants 3 messages Feb 27, 2006 – Feb 28, 2006 Sound

lore
Share & tools
lore
#0 lore raw

Hi Takashi.

Noticed the snd-opti92x driver wouldn't compile without ISA-PnP support. I see the driver only supports one card meaning it wants a bit more than this to bring it inline, but a minimal fix is attached.

I do actually have a pnp opti92x / cs4231 card lying around somewhere although not available right now. I'll dig it up and do some cleanup / testing in the not too distant future, if you'd like me to.

Rene.

sound/isa/opti9xx/opti92x-ad1848.c +7 -2
Index: local/sound/isa/opti9xx/opti92x-ad1848.c
===================================================================
@@ -2088,9 +2088,12 @@ static int __init alsa_card_opti9xx_init
 	int error;
 	struct platform_device *device;
 
+#ifdef CONFIG_PNP
 	pnp_register_card_driver(&opti9xx_pnpc_driver);
 	if (snd_opti9xx_pnp_is_probed)
 		return 0;
+	pnp_unregister_card_driver(&opti9xx_pnpc_driver);
+#endif
 	if (! is_isapnp_selected()) {
 		error = platform_driver_register(&snd_opti9xx_driver);
 		if (error < 0)
@@ -2102,7 +2105,6 @@ static int __init alsa_card_opti9xx_init
 		}
 		platform_driver_unregister(&snd_opti9xx_driver);
 	}
-	pnp_unregister_card_driver(&opti9xx_pnpc_driver);
 #ifdef MODULE
 	printk(KERN_ERR "no OPTi " CHIP_NAME " soundcard found\n");
 #endif
@@ -2115,7 +2117,10 @@ static void __exit alsa_card_opti9xx_exi
 		platform_device_unregister(snd_opti9xx_platform_device);
 		platform_driver_unregister(&snd_opti9xx_driver);
 	}
-	pnp_unregister_card_driver(&opti9xx_pnpc_driver);
+#ifdef CONFIG_PNP
+	else
+		pnp_unregister_card_driver(&opti9xx_pnpc_driver);
+#endif
 }
 
 module_init(alsa_card_opti9xx_init)
#1 lore raw

At Mon, 27 Feb 2006 23:06:40 +0100,

Quoted 10 lines · Rene Herman

Hi Takashi.

Noticed the snd-opti92x driver wouldn't compile without ISA-PnP support. I see the driver only supports one card meaning it wants a bit more than this to bring it inline, but a minimal fix is attached.

I do actually have a pnp opti92x / cs4231 card lying around somewhere although not available right now. I'll dig it up and do some cleanup / testing in the not too distant future, if you'd like me to.

Thanks, a similar fix was already on ALSA CVS tree yesterday (although yours looks nicer :) Maybe better to wait until the clean up patch?

Takashi

Quoted 31 lines

Rene.

[2 opti92x_pnpc_driver.diff <text/plain (7bit)>]
Index: local/sound/isa/opti9xx/opti92x-ad1848.c
===================================================================

sound/isa/opti9xx/opti92x-ad1848.c +3 -1
@@ -2088,9 +2088,12 @@ static int __init alsa_card_opti9xx_init
 	int error;
 	struct platform_device *device;
 
+#ifdef CONFIG_PNP
 	pnp_register_card_driver(&opti9xx_pnpc_driver);
 	if (snd_opti9xx_pnp_is_probed)
 		return 0;
+	pnp_unregister_card_driver(&opti9xx_pnpc_driver);
+#endif
 	if (! is_isapnp_selected()) {
 		error = platform_driver_register(&snd_opti9xx_driver);
 		if (error < 0)
@@ -2102,7 +2105,6 @@ static int __init alsa_card_opti9xx_init
 		}
 		platform_driver_unregister(&snd_opti9xx_driver);
 	}
-	pnp_unregister_card_driver(&opti9xx_pnpc_driver);
 #ifdef MODULE
 	printk(KERN_ERR "no OPTi " CHIP_NAME " soundcard found\n");
 #endif
@@ -2115,7 +2117,10 @@ static void __exit alsa_card_opti9xx_exi
 		platform_device_unregister(snd_opti9xx_platform_device);

sound/isa/opti9xx/opti92x-ad1848.c static void __exit alsa_card_opti9xx_exi · line 2126

Quoted 10 lines
sound/isa/opti9xx/opti92x-ad1848.c +4 -1
 		platform_driver_unregister(&snd_opti9xx_driver);
 	}
-	pnp_unregister_card_driver(&opti9xx_pnpc_driver);
+#ifdef CONFIG_PNP
+	else
+		pnp_unregister_card_driver(&opti9xx_pnpc_driver);
+#endif
 }
 
 module_init(alsa_card_opti9xx_init)

-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642

#2 lore raw
Quoted 3 lines · Takashi Iwai

Thanks, a similar fix was already on ALSA CVS tree yesterday (although yours looks nicer :) Maybe better to wait until the clean up patch?

Oh, okay, yes, that's fine.

Rene.

-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642