mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 01/19] Char: moxa, remove static isa support
@ 2008-02-22 14:46 Jiri Slaby
  2008-02-22 14:46 ` [PATCH 02/19] Char: moxa, cleanup module-param passed isa init Jiri Slaby
                   ` (19 more replies)
  0 siblings, 20 replies; 21+ messages in thread
From: Jiri Slaby @ 2008-02-22 14:46 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel, alan, Oyvind Aabling, Jiri Slaby

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>
---
 drivers/char/moxa.c |   34 ++--------------------------------
 1 files changed, 2 insertions(+), 32 deletions(-)

diff --git a/drivers/char/moxa.c b/drivers/char/moxa.c
index 64b7b2b..7f4d1ec 100644
--- a/drivers/char/moxa.c
+++ b/drivers/char/moxa.c
@@ -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];
-- 
1.5.4.1


^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2008-02-22 20:12 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-22 14:46 [PATCH 01/19] Char: moxa, remove static isa support Jiri Slaby
2008-02-22 14:46 ` [PATCH 02/19] Char: moxa, cleanup module-param passed isa init Jiri Slaby
2008-02-22 14:46 ` [PATCH 03/19] Char: moxa, pci io space fixup Jiri Slaby
2008-02-22 14:46 ` [PATCH 04/19] Char: moxa, fix TIOC(G/S)SOFTCAR param Jiri Slaby
2008-02-22 14:46 ` [PATCH 05/19] Char: moxa, add firmware loading Jiri Slaby
2008-02-22 14:46 ` [PATCH 06/19] Char: moxa, merge c2xx and c320 " Jiri Slaby
2008-02-22 14:46 ` [PATCH 07/19] Char: moxa, remove port->port Jiri Slaby
2008-02-22 14:46 ` [PATCH 08/19] Char: moxa, remove unused port entries Jiri Slaby
2008-02-22 14:46 ` [PATCH 09/19] Char: moxa, centralize board readiness Jiri Slaby
2008-02-22 14:46 ` [PATCH 10/19] Char: moxa, timer cleanup Jiri Slaby
2008-02-22 14:46 ` [PATCH 11/19] Char: moxa, ioctl cleanup Jiri Slaby
2008-02-22 14:46 ` [PATCH 12/19] Char: moxa, merge 2 poll functions Jiri Slaby
2008-02-22 14:46 ` [PATCH 13/19] Char: moxa, cleanup rx/tx Jiri Slaby
2008-02-22 14:46 ` [PATCH 14/19] Char: moxa, serialise timer Jiri Slaby
2008-02-22 14:46 ` [PATCH 15/19] Char: moxa, rework open/close Jiri Slaby
2008-02-22 14:46 ` [PATCH 16/19] Char: moxa, little cleanup Jiri Slaby
2008-02-22 14:46 ` [PATCH 17/19] Char: moxa, remove useless tty functions Jiri Slaby
2008-02-22 14:46 ` [PATCH 18/19] Char: moxa, introduce MOXA_IS_320 macro Jiri Slaby
2008-02-22 14:46 ` [PATCH 19/19] Char: moxa, notify about board readiness Jiri Slaby
2008-02-22 20:09 ` [PATCH 20/21] Char: moxa, update credits Jiri Slaby
2008-02-22 20:09 ` [PATCH 21/21] Char: moxa, add firmware loading fix Jiri Slaby

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

Powered by JetHome