Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Rene Herman <rene.herman@keyaccess.nl>
To: Takashi Iwai <tiwai@suse.de>
Cc: alsa-devel@alsa-project.org
Subject: snd-opti92x-{ad1848,cs4231} won't compile without CONFIG_PNP
Date: Mon, 27 Feb 2006 23:06:40 +0100	[thread overview]
Message-ID: <440377F0.6040201@keyaccess.nl> (raw)

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

             reply	other threads:[~2006-02-27 22:05 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-27 22:06 Rene Herman [this message]
2006-02-28 10:23 ` snd-opti92x-{ad1848,cs4231} won't compile without CONFIG_PNP Takashi Iwai
2006-02-28 15:43   ` Rene Herman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=440377F0.6040201@keyaccess.nl \
    --to=rene.herman@keyaccess.nl \
    --cc=alsa-devel@alsa-project.org \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox