public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] remove warnings from drivers/char/moxa.c
@ 2000-12-08 20:34 Rasmus Andersen
  0 siblings, 0 replies; only message in thread
From: Rasmus Andersen @ 2000-12-08 20:34 UTC (permalink / raw)
  To: support; +Cc: linux-kernel

Hi.

The following patch makes some 'defined but not used' warnings go away
when compiling drivers/char/moxa.c without CONFIG_PCI (240t12p3). It should
apply cleanly.


--- linux-240-t12-pre3-clean/drivers/char/moxa.c	Wed May  3 10:45:18 2000
+++ linux/drivers/char/moxa.c	Wed Nov 29 18:35:01 2000
@@ -111,12 +111,14 @@
 	unsigned short board_type;
 } moxa_pciinfo;
 
+#ifdef CONFIG_PCI
 static moxa_pciinfo moxa_pcibrds[] =
 {
 	{PCI_VENDOR_ID_MOXA, PCI_DEVICE_ID_C218, MOXA_BOARD_C218_PCI},
 	{PCI_VENDOR_ID_MOXA, PCI_DEVICE_ID_C320, MOXA_BOARD_C320_PCI},
 	{PCI_VENDOR_ID_MOXA, PCI_DEVICE_ID_CP204J, MOXA_BOARD_CP204J},
 };
+#endif
 
 typedef struct _moxa_isa_board_conf {
 	int boardType;
@@ -236,7 +238,10 @@
 /*
  * static functions:
  */
+#ifdef CONFIG_PCI
 static int moxa_get_PCI_conf(struct pci_dev *, int, moxa_board_conf *);
+#endif
+
 static void do_moxa_softint(void *);
 static int moxa_open(struct tty_struct *, struct file *);
 static void moxa_close(struct tty_struct *, struct file *);
@@ -333,7 +338,7 @@
 
 int moxa_init(void)
 {
-	int i, n, numBoards;
+	int i, numBoards;
 	struct moxa_str *ch;
 	int ret1, ret2;
 
@@ -484,6 +489,8 @@
 #ifdef CONFIG_PCI
 	{
 		struct pci_dev *p = NULL;
+		int n;
+
 		n = sizeof(moxa_pcibrds) / sizeof(moxa_pciinfo);
 		i = 0;
 		while (i < n) {
@@ -511,6 +518,7 @@
 	return (0);
 }
 
+#ifdef CONFIG_PCI
 static int moxa_get_PCI_conf(struct pci_dev *p, int board_type, moxa_board_conf * board)
 {
 	board->baseAddr = pci_resource_start (p, 2);
@@ -534,6 +542,7 @@
 
 	return (0);
 }
+#endif
 
 static void do_moxa_softint(void *private_)
 {

-- 
Regards,
        Rasmus(rasmus@jaquet.dk)

Genius may have its limitations, but stupidity is not thus handicapped. 
  -- Elbert Hubbard 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2000-12-08 21:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-12-08 20:34 [PATCH] remove warnings from drivers/char/moxa.c Rasmus Andersen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox