Commit a78639c7 authored by Takashi Iwai's avatar Takashi Iwai Committed by Greg Kroah-Hartman

[PATCH] opti9x - Fix compile without CONFIG_PNP

Modules: Opti9xx drivers

Fix compile errors without CONFIG_PNP.

This patch was already included in Linus' tree.
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
Signed-off-by: default avatarAdrian Bunk <bunk@stusta.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 33ac640f
...@@ -2088,9 +2088,11 @@ static int __init alsa_card_opti9xx_init(void) ...@@ -2088,9 +2088,11 @@ static int __init alsa_card_opti9xx_init(void)
int error; int error;
struct platform_device *device; struct platform_device *device;
#ifdef CONFIG_PNP
pnp_register_card_driver(&opti9xx_pnpc_driver); pnp_register_card_driver(&opti9xx_pnpc_driver);
if (snd_opti9xx_pnp_is_probed) if (snd_opti9xx_pnp_is_probed)
return 0; return 0;
#endif
if (! is_isapnp_selected()) { if (! is_isapnp_selected()) {
error = platform_driver_register(&snd_opti9xx_driver); error = platform_driver_register(&snd_opti9xx_driver);
if (error < 0) if (error < 0)
...@@ -2102,7 +2104,9 @@ static int __init alsa_card_opti9xx_init(void) ...@@ -2102,7 +2104,9 @@ static int __init alsa_card_opti9xx_init(void)
} }
platform_driver_unregister(&snd_opti9xx_driver); platform_driver_unregister(&snd_opti9xx_driver);
} }
#ifdef CONFIG_PNP
pnp_unregister_card_driver(&opti9xx_pnpc_driver); pnp_unregister_card_driver(&opti9xx_pnpc_driver);
#endif
#ifdef MODULE #ifdef MODULE
printk(KERN_ERR "no OPTi " CHIP_NAME " soundcard found\n"); printk(KERN_ERR "no OPTi " CHIP_NAME " soundcard found\n");
#endif #endif
...@@ -2115,7 +2119,9 @@ static void __exit alsa_card_opti9xx_exit(void) ...@@ -2115,7 +2119,9 @@ static void __exit alsa_card_opti9xx_exit(void)
platform_device_unregister(snd_opti9xx_platform_device); platform_device_unregister(snd_opti9xx_platform_device);
platform_driver_unregister(&snd_opti9xx_driver); platform_driver_unregister(&snd_opti9xx_driver);
} }
#ifdef CONFIG_PNP
pnp_unregister_card_driver(&opti9xx_pnpc_driver); pnp_unregister_card_driver(&opti9xx_pnpc_driver);
#endif
} }
module_init(alsa_card_opti9xx_init) module_init(alsa_card_opti9xx_init)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment