[PATCH] remove warnings from drivers/char/moxa.c

From: Rasmus Andersen (rasmus@jaquet.dk)
Date: Fri Dec 08 2000 - 15:34:56 EST


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/



This archive was generated by hypermail 2b29 : Fri Dec 15 2000 - 21:00:15 EST