remove warnings from drivers/char/moxa.c
PATCH 1/1 remove warnings from drivers/char/moxa.c
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.
drivers/char/moxa.c +10 -1
@@ -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_) {
Signature · 9 lines
Regards,
Rasmus([email protected])
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 [email protected]
Please read the FAQ at http://www.tux.org/lkml/