Skip to contentSkip to conversation

parport_pc: wrap PNP probe code in #ifdef CONFIG_PNP

PATCH New Bjorn Helgaas 1 participant 1 message Mar 27, 2008 Parallel port

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 parport_pc: wrap PNP probe code in #ifdef CONFIG_PNP

Wrap PNP probe code in #ifdef CONFIG_PNP. We already do the same for CONFIG_PCI.

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.)

drivers/parport/parport_pc.c +4 -0
Index: work7/drivers/parport/parport_pc.c
===================================================================
@@ -3083,6 +3083,7 @@
 static int __init parport_pc_init_superio(int autoirq, int autodma) {return 0;}
 #endif /* CONFIG_PCI */
 
+#ifdef CONFIG_PNP
 
 static const struct pnp_device_id parport_pc_pnp_tbl[] = {
 	/* Standard LPT Printer Port */
@@ -3149,6 +3150,9 @@
 	.remove		= parport_pc_pnp_remove,
 };
 
+#else
+static struct pnp_driver parport_pc_pnp_driver;
+#endif /* CONFIG_PNP */
 
 static int __devinit parport_pc_platform_probe(struct platform_device *pdev)
 {