All of lore.kernel.org
 help / color / mirror / Atom feed
* snd-opti92x-{ad1848,cs4231} won't compile without CONFIG_PNP
@ 2006-02-27 22:06 Rene Herman
  2006-02-28 10:23 ` Takashi Iwai
  0 siblings, 1 reply; 3+ messages in thread
From: Rene Herman @ 2006-02-27 22:06 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel

[-- Attachment #1: Type: text/plain, Size: 429 bytes --]

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.


[-- Attachment #2: opti92x_pnpc_driver.diff --]
[-- Type: text/plain, Size: 1301 bytes --]

Index: local/sound/isa/opti9xx/opti92x-ad1848.c
===================================================================
--- local.orig/sound/isa/opti9xx/opti92x-ad1848.c	2006-02-27 19:22:35.000000000 +0100
+++ local/sound/isa/opti9xx/opti92x-ad1848.c	2006-02-27 22:26:52.000000000 +0100
@@ -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)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: snd-opti92x-{ad1848,cs4231} won't compile without CONFIG_PNP
  2006-02-27 22:06 snd-opti92x-{ad1848,cs4231} won't compile without CONFIG_PNP Rene Herman
@ 2006-02-28 10:23 ` Takashi Iwai
  2006-02-28 15:43   ` Rene Herman
  0 siblings, 1 reply; 3+ messages in thread
From: Takashi Iwai @ 2006-02-28 10:23 UTC (permalink / raw)
  To: Rene Herman; +Cc: alsa-devel

At Mon, 27 Feb 2006 23:06:40 +0100,
Rene Herman wrote:
> 
> 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

> 
> Rene.
> 
> [2 opti92x_pnpc_driver.diff <text/plain (7bit)>]
> Index: local/sound/isa/opti9xx/opti92x-ad1848.c
> ===================================================================
> --- local.orig/sound/isa/opti9xx/opti92x-ad1848.c	2006-02-27 19:22:35.000000000 +0100
> +++ local/sound/isa/opti9xx/opti92x-ad1848.c	2006-02-27 22:26:52.000000000 +0100
> @@ -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)


-------------------------------------------------------
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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Re: snd-opti92x-{ad1848,cs4231} won't compile without CONFIG_PNP
  2006-02-28 10:23 ` Takashi Iwai
@ 2006-02-28 15:43   ` Rene Herman
  0 siblings, 0 replies; 3+ messages in thread
From: Rene Herman @ 2006-02-28 15:43 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: alsa-devel

Takashi Iwai wrote:

> 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

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-02-28 15:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-27 22:06 snd-opti92x-{ad1848,cs4231} won't compile without CONFIG_PNP Rene Herman
2006-02-28 10:23 ` Takashi Iwai
2006-02-28 15:43   ` Rene Herman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.