From 59b1b34f47e6c8ac8f00660db2cd34216819b400 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Wed, 4 Jan 2006 15:06:44 +0100 Subject: [ALSA] Fix compilation without CONFIG_PNP Fix compilation of some ISA drivers without CONFIG_PNP. Signed-off-by: Takashi Iwai --- sound/isa/cmi8330.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'sound/isa/cmi8330.c') diff --git a/sound/isa/cmi8330.c b/sound/isa/cmi8330.c index bd8e23818460..fd9bb2575de8 100644 --- a/sound/isa/cmi8330.c +++ b/sound/isa/cmi8330.c @@ -109,7 +109,9 @@ module_param_array(wssdma, int, NULL, 0444); MODULE_PARM_DESC(wssdma, "DMA for CMI8330 WSS driver."); static struct platform_device *platform_devices[SNDRV_CARDS]; +#ifdef CONFIG_PNP static int pnp_registered; +#endif #define CMI8330_RMUX3D 16 #define CMI8330_MUTEMUX 17 @@ -672,8 +674,10 @@ static void __init_or_module snd_cmi8330_unregister_all(void) { int i; +#ifdef CONFIG_PNP if (pnp_registered) pnp_unregister_card_driver(&cmi8330_pnpc_driver); +#endif for (i = 0; i < ARRAY_SIZE(platform_devices); ++i) platform_device_unregister(platform_devices[i]); platform_driver_unregister(&snd_cmi8330_driver); @@ -700,11 +704,13 @@ static int __init alsa_card_cmi8330_init(void) cards++; } +#ifdef CONFIG_PNP err = pnp_register_card_driver(&cmi8330_pnpc_driver); if (err >= 0) { pnp_registered = 1; cards += err; } +#endif if (!cards) { #ifdef MODULE -- cgit v1.2.1