diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-05-05 04:06:54 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-05-05 04:06:54 -0400 |
commit | 7a1aa309f21ea2f6c31f364341e4027ecf4e79bc (patch) | |
tree | d93a1ce044477aefb464ce92512fd4025b535228 /drivers/net/irda/smsc-ircc2.c | |
parent | c17f888f8fc2e47e2b4a51424f8ccf564ae87576 (diff) |
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 <mingo@elte.hu>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/irda/smsc-ircc2.c')
-rw-r--r-- | drivers/net/irda/smsc-ircc2.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/irda/smsc-ircc2.c b/drivers/net/irda/smsc-ircc2.c index 1f26da761e9f..cfe0194fef71 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); | |||
376 | 376 | ||
377 | static int pnp_driver_registered; | 377 | static int pnp_driver_registered; |
378 | 378 | ||
379 | #ifdef CONFIG_PNP | ||
379 | static int __init smsc_ircc_pnp_probe(struct pnp_dev *dev, | 380 | static int __init smsc_ircc_pnp_probe(struct pnp_dev *dev, |
380 | const struct pnp_device_id *dev_id) | 381 | const struct pnp_device_id *dev_id) |
381 | { | 382 | { |
@@ -402,7 +403,9 @@ static struct pnp_driver smsc_ircc_pnp_driver = { | |||
402 | .id_table = smsc_ircc_pnp_table, | 403 | .id_table = smsc_ircc_pnp_table, |
403 | .probe = smsc_ircc_pnp_probe, | 404 | .probe = smsc_ircc_pnp_probe, |
404 | }; | 405 | }; |
405 | 406 | #else /* CONFIG_PNP */ | |
407 | static struct pnp_driver smsc_ircc_pnp_driver; | ||
408 | #endif | ||
406 | 409 | ||
407 | /******************************************************************************* | 410 | /******************************************************************************* |
408 | * | 411 | * |