summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjorn Helgaas <bjorn.helgaas@hp.com>2008-03-28 10:53:06 -0600
committerStephen Rothwell <sfr@canb.auug.org.au>2008-04-10 17:23:17 +1000
commiteaf66d31e9258ba946e394e5ffc6602e76cb8c6e (patch)
treeae0699e578e5f0affba02ed6913d7eeabfcd20d7
parent5f91dfc1d6e2d7d8e19138113d74473ef9808582 (diff)
smsc-ircc2: wrap PNP probe code in #ifdef CONFIG_PNP
Wrap PNP probe code in #ifdef CONFIG_PNP. Without this change, we'll have unresolved references to pnp_get_resource() function when CONFIG_PNP=n. (This is a new interface that's not in mainline yet.) Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
-rw-r--r--drivers/net/irda/smsc-ircc2.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/net/irda/smsc-ircc2.c b/drivers/net/irda/smsc-ircc2.c
index 1f26da761e9f..a09221feb9ef 100644
--- a/drivers/net/irda/smsc-ircc2.c
+++ b/drivers/net/irda/smsc-ircc2.c
@@ -79,9 +79,13 @@ MODULE_AUTHOR("Daniele Peri <peri@csai.unipa.it>");
MODULE_DESCRIPTION("SMC IrCC SIR/FIR controller driver");
MODULE_LICENSE("GPL");
+#ifdef CONFIG_PNP
static int smsc_nopnp = 1;
module_param_named(nopnp, smsc_nopnp, bool, 0);
MODULE_PARM_DESC(nopnp, "Do not use PNP to detect controller settings, defaults to true");
+#else
+#define smsc_nopnp 1
+#endif
#define DMA_INVAL 255
static int ircc_dma = DMA_INVAL;
@@ -366,6 +370,10 @@ static inline void register_bank(int iobase, int bank)
iobase + IRCC_MASTER);
}
+static int pnp_driver_registered;
+
+#ifdef CONFIG_PNP
+
/* PNP hotplug support */
static const struct pnp_device_id smsc_ircc_pnp_table[] = {
{ .id = "SMCf010", .driver_data = 0 },
@@ -374,8 +382,6 @@ static const struct pnp_device_id smsc_ircc_pnp_table[] = {
};
MODULE_DEVICE_TABLE(pnp, smsc_ircc_pnp_table);
-static int pnp_driver_registered;
-
static int __init smsc_ircc_pnp_probe(struct pnp_dev *dev,
const struct pnp_device_id *dev_id)
{
@@ -403,6 +409,10 @@ static struct pnp_driver smsc_ircc_pnp_driver = {
.probe = smsc_ircc_pnp_probe,
};
+#else
+static struct pnp_driver smsc_ircc_pnp_driver;
+#endif
+
/*******************************************************************************
*