From: Guenter Roeck <linux@roeck-us.net>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Wei Yongjun <yongjun_wei@trendmicro.com.cn>,
Steven Rostedt <rostedt@goodmis.org>,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org,
Guenter Roeck <linux@roeck-us.net>
Subject: [PATCH] staging: (sb105x) Fix compile error seen if PARPORT_PC is undefined
Date: Fri, 28 Dec 2012 12:41:11 -0800 [thread overview]
Message-ID: <1356727271-21633-1-git-send-email-linux@roeck-us.net> (raw)
Fix:
ERROR: "parport_pc_probe_port" [drivers/staging/sb105x/sb105x.ko] undefined!
by making the code calling it conditional. Also remove the external reference to
parport_pc_probe_port() from the sb105x source file, as it doesn't belong there.
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
---
drivers/staging/sb105x/sb_pci_mp.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/drivers/staging/sb105x/sb_pci_mp.c b/drivers/staging/sb105x/sb_pci_mp.c
index edb2a85..b7ded88 100644
--- a/drivers/staging/sb105x/sb_pci_mp.c
+++ b/drivers/staging/sb105x/sb_pci_mp.c
@@ -1,12 +1,7 @@
#include "sb_pci_mp.h"
#include <linux/module.h>
#include <linux/parport.h>
-
-extern struct parport *parport_pc_probe_port(unsigned long base_lo,
- unsigned long base_hi,
- int irq, int dma,
- struct device *dev,
- int irqflags);
+#include <linux/parport_pc.h>
static struct mp_device_t mp_devs[MAX_MP_DEV];
static int mp_nrpcibrds = sizeof(mp_pciboards)/sizeof(mppcibrd_t);
@@ -3066,12 +3061,16 @@ static int init_mp_dev(struct pci_dev *pcidev, mppcibrd_t brd)
pci_remap_base(pcidev, PCI_BASE_ADDRESS_1, prev_port_addr + 8, 8);
}
+#if IS_ENABLED(CONFIG_PARPORT_PC)
/* add PC compatible parallel port */
parport_pc_probe_port(pcidev->resource[2].start, pcidev->resource[3].start, PARPORT_IRQ_NONE, PARPORT_DMA_NONE, &pcidev->dev, 0);
+#endif
break;
case PCI_DEVICE_ID_MP1P :
+#if IS_ENABLED(CONFIG_PARPORT_PC)
/* add PC compatible parallel port */
parport_pc_probe_port(pcidev->resource[2].start, pcidev->resource[3].start, PARPORT_IRQ_NONE, PARPORT_DMA_NONE, &pcidev->dev, 0);
+#endif
break;
}
--
1.7.9.7
reply other threads:[~2012-12-28 20:41 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=1356727271-21633-1-git-send-email-linux@roeck-us.net \
--to=linux@roeck-us.net \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rostedt@goodmis.org \
--cc=yongjun_wei@trendmicro.com.cn \
/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®