Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757094AbYC1Qt0 (ORCPT ); Fri, 28 Mar 2008 12:49:26 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753560AbYC1QtR (ORCPT ); Fri, 28 Mar 2008 12:49:17 -0400 Received: from g1t0029.austin.hp.com ([15.216.28.36]:18829 "EHLO g1t0029.austin.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751000AbYC1QtQ (ORCPT ); Fri, 28 Mar 2008 12:49:16 -0400 From: Bjorn Helgaas To: Andrew Morton Subject: [patch] smsc-ircc2: wrap PNP probe code in #ifdef CONFIG_PNP Date: Fri, 28 Mar 2008 10:53:06 -0600 User-Agent: KMail/1.9.6 (enterprise 0.20070907.709405) Cc: Stephen Rothwell , Kamalesh Babulal , linux-kernel@vger.kernel.org, Samuel Ortiz , irda-users@lists.sourceforge.net, linux-next@vger.kernel.org MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200803281053.08495.bjorn.helgaas@hp.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1843 Lines: 62 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 Index: work7/drivers/net/irda/smsc-ircc2.c =================================================================== --- work7.orig/drivers/net/irda/smsc-ircc2.c 2008-03-28 10:47:07.000000000 -0600 +++ work7/drivers/net/irda/smsc-ircc2.c 2008-03-28 10:47:10.000000000 -0600 @@ -79,9 +79,13 @@ 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 @@ 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 @@ }; 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 @@ .probe = smsc_ircc_pnp_probe, }; +#else +static struct pnp_driver smsc_ircc_pnp_driver; +#endif + /******************************************************************************* * -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/