diff options
author | Takashi Iwai <tiwai@suse.de> | 2007-06-20 12:03:09 +0200 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2007-07-20 11:11:13 +0200 |
commit | 101f6f4ba7109aafd7b3f2eafd7124f854dda451 (patch) | |
tree | c546374cd69046aedee683eb3ce7e259ee496cd8 /sound/isa/opti9xx | |
parent | 9a79b2274186fade17134929d4f85b70d59a3840 (diff) | |
download | blackbird-op-linux-101f6f4ba7109aafd7b3f2eafd7124f854dda451.tar.gz blackbird-op-linux-101f6f4ba7109aafd7b3f2eafd7124f854dda451.zip |
[ALSA] Fix unfreed pnp driver in opti9xx ISA driver
- Added the missing pnp_unregister_card_driver() in the case ISA PnP
isn't found, which caused an error at kobject_add with -EEXIST
Jun 11 09:07:31 rain kernel: kobject_add failed for opti9xx with -EEXIST, don't try to register things with the same name in the same directory.
Jun 11 09:07:31 rain kernel: [<c01c18fa>] kobject_shadow_add+0x12a/0x1c0
Jun 11 09:07:31 rain kernel: [<c01c1a81>] kobject_register+0x21/0x50
Jun 11 09:07:31 rain kernel: [<c01f09a2>] bus_add_driver+0x72/0x1b0
Jun 11 09:07:31 rain kernel: [<c01d3dff>] pnp_register_card_driver+0x4f/0xc0
Jun 11 09:07:31 rain kernel: [<c89bc00a>] alsa_card_opti9xx_init+0xa/0x25 [snd_opti92x_ad1848]
Jun 11 09:07:31 rain kernel: [<c0136947>] sys_init_module+0x157/0x1610
Jun 11 09:07:31 rain kernel: [<c01029b4>] syscall_call+0x7/0xb
- Fixed the probe behavior when no PnP is set up. Now it behaves
like the former version.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jaroslav Kysela <perex@suse.cz>
Diffstat (limited to 'sound/isa/opti9xx')
-rw-r--r-- | sound/isa/opti9xx/opti92x-ad1848.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/isa/opti9xx/opti92x-ad1848.c b/sound/isa/opti9xx/opti92x-ad1848.c index 60c120ffb9de..049d479ce2b3 100644 --- a/sound/isa/opti9xx/opti92x-ad1848.c +++ b/sound/isa/opti9xx/opti92x-ad1848.c @@ -1927,10 +1927,12 @@ static struct snd_card *snd_opti9xx_card_new(void) static int __devinit snd_opti9xx_isa_match(struct device *devptr, unsigned int dev) { +#ifdef CONFIG_PNP if (snd_opti9xx_pnp_is_probed) return 0; if (isapnp) return 0; +#endif return 1; } @@ -2096,6 +2098,7 @@ static int __init alsa_card_opti9xx_init(void) pnp_register_card_driver(&opti9xx_pnpc_driver); if (snd_opti9xx_pnp_is_probed) return 0; + pnp_unregister_card_driver(&opti9xx_pnpc_driver); #endif return isa_register_driver(&snd_opti9xx_driver, 1); } |