mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bjorn Helgaas <bjorn.helgaas@hp.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>,
	Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>,
	linux-kernel@vger.kernel.org, Samuel Ortiz <samuel@sortiz.org>,
	irda-users@lists.sourceforge.net, linux-next@vger.kernel.org
Subject: [patch] smsc-ircc2: wrap PNP probe code in #ifdef CONFIG_PNP
Date: Fri, 28 Mar 2008 10:53:06 -0600	[thread overview]
Message-ID: <200803281053.08495.bjorn.helgaas@hp.com> (raw)

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>

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
+
 
 /*******************************************************************************
  *

                 reply	other threads:[~2008-03-28 16:49 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200803281053.08495.bjorn.helgaas@hp.com \
    --to=bjorn.helgaas@hp.com \
    --cc=akpm@linux-foundation.org \
    --cc=irda-users@lists.sourceforge.net \
    --cc=kamalesh@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=samuel@sortiz.org \
    --cc=sfr@canb.auug.org.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®