From: Ingo Molnar Date: Mon, 5 May 2008 08:06:54 +0000 (-0700) Subject: irda: fix !PNP support for drivers/net/irda/smsc-ircc2.c X-Git-Tag: v2.6.26-rc2~60^2~4 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=7a1aa309f21ea2f6c31f364341e4027ecf4e79bc;p=linux-2.6-omap-h63xx.git irda: fix !PNP support for drivers/net/irda/smsc-ircc2.c x86.git testing found this build bug on v2.6.26-rc1: ERROR: "pnp_get_resource" [drivers/net/irda/smsc-ircc2.ko] undefined! make[1]: *** [__modpost] Error 1 make: *** [modules] Error 2 the driver did not anticipate the case of !CONFIG_PNP which is rare but still possible. Instead of restricting the driver to PNP-only in the Kconfig space, add the (trivial) dummy struct pnp_driver - this is that other drivers use in the !PNP case too. The driver itself can in theory be initialized on !PNP too in certain cases, via smsc_ircc_legacy_probe(). Patch only minimally build tested, i dont have this hardware. Signed-off-by: Ingo Molnar Signed-off-by: David S. Miller --- diff --git a/drivers/net/irda/smsc-ircc2.c b/drivers/net/irda/smsc-ircc2.c index 1f26da761e9..cfe0194fef7 100644 --- a/drivers/net/irda/smsc-ircc2.c +++ b/drivers/net/irda/smsc-ircc2.c @@ -376,6 +376,7 @@ MODULE_DEVICE_TABLE(pnp, smsc_ircc_pnp_table); static int pnp_driver_registered; +#ifdef CONFIG_PNP static int __init smsc_ircc_pnp_probe(struct pnp_dev *dev, const struct pnp_device_id *dev_id) { @@ -402,7 +403,9 @@ static struct pnp_driver smsc_ircc_pnp_driver = { .id_table = smsc_ircc_pnp_table, .probe = smsc_ircc_pnp_probe, }; - +#else /* CONFIG_PNP */ +static struct pnp_driver smsc_ircc_pnp_driver; +#endif /******************************************************************************* *