Char: moxa, remove static isa support
authorJiri Slaby <jirislaby@gmail.com>
Wed, 30 Apr 2008 07:53:36 +0000 (00:53 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 30 Apr 2008 15:29:41 +0000 (08:29 -0700)
Static ISA field is empty and probably will never be filled in, remove it.
The driver still supports ISA cards passed through module parameter.  This
actually fixes one bug inside the initialization of module-param passed cards
initialization.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Tested-by: Oyvind Aabling <Oyvind.Aabling@uni-c.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/char/moxa.c

index 64b7b2b18352526d92e0ebf83f6bda424aed7d1c..7f4d1ec4b03d522db289ff4701096acb2e8b067d 100644 (file)
@@ -92,17 +92,6 @@ static struct pci_device_id moxa_pcibrds[] = {
 MODULE_DEVICE_TABLE(pci, moxa_pcibrds);
 #endif /* CONFIG_PCI */
 
-struct moxa_isa_board_conf {
-       int boardType;
-       int numPorts;
-       unsigned long baseAddr;
-};
-
-static struct moxa_isa_board_conf moxa_isa_boards[] =
-{
-/*       {MOXA_BOARD_C218_ISA,8,0xDC000}, */
-};
-
 static struct moxa_board_conf {
        int boardType;
        int numPorts;
@@ -346,7 +335,7 @@ static struct pci_driver moxa_pci_driver = {
 
 static int __init moxa_init(void)
 {
-       int i, numBoards, retval = 0;
+       int i, numBoards = 0, retval = 0;
        struct moxa_port *ch;
 
        printk(KERN_INFO "MOXA Intellio family driver version %s\n",
@@ -391,25 +380,6 @@ static int __init moxa_init(void)
 
        mod_timer(&moxaTimer, jiffies + HZ / 50);
 
-       /* Find the boards defined in source code */
-       numBoards = 0;
-       for (i = 0; i < MAX_BOARDS; i++) {
-               if ((moxa_isa_boards[i].boardType == MOXA_BOARD_C218_ISA) ||
-                (moxa_isa_boards[i].boardType == MOXA_BOARD_C320_ISA)) {
-                       moxa_boards[numBoards].boardType = moxa_isa_boards[i].boardType;
-                       if (moxa_isa_boards[i].boardType == MOXA_BOARD_C218_ISA)
-                               moxa_boards[numBoards].numPorts = 8;
-                       else
-                               moxa_boards[numBoards].numPorts = moxa_isa_boards[i].numPorts;
-                       moxa_boards[numBoards].busType = MOXA_BUS_TYPE_ISA;
-                       moxa_boards[numBoards].baseAddr = moxa_isa_boards[i].baseAddr;
-                       pr_debug("Moxa board %2d: %s board(baseAddr=%lx)\n",
-                              numBoards + 1,
-                              moxa_brdname[moxa_boards[numBoards].boardType-1],
-                              moxa_boards[numBoards].baseAddr);
-                       numBoards++;
-               }
-       }
        /* Find the boards defined form module args. */
 #ifdef MODULE
        for (i = 0; i < MAX_BOARDS; i++) {
@@ -425,7 +395,7 @@ static int __init moxa_init(void)
                                continue;
                        }
                        moxa_boards[numBoards].boardType = type[i];
-                       if (moxa_isa_boards[i].boardType == MOXA_BOARD_C218_ISA)
+                       if (type[i] == MOXA_BOARD_C218_ISA)
                                moxa_boards[numBoards].numPorts = 8;
                        else
                                moxa_boards[numBoards].numPorts = numports[i];