Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 95183
b: refs/heads/master
c: 3779495
h: refs/heads/master
i:
  95181: ecab8ad
  95179: 911f0a9
  95175: e71f17e
  95167: 513ef84
v: v3
  • Loading branch information
Jiri Slaby authored and Linus Torvalds committed Apr 30, 2008
1 parent 598861d commit 7f3b789
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 33 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cbacdd9572285c86848dd323dc764abb3681ddbc
refs/heads/master: 37794952a685538f20ac9792e98f1c9b161dbdfe
34 changes: 2 additions & 32 deletions trunk/drivers/char/moxa.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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++) {
Expand All @@ -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];
Expand Down

0 comments on commit 7f3b789

Please sign in to comment.