diff options
Diffstat (limited to 'drivers/char/moxa.c')
-rw-r--r-- | drivers/char/moxa.c | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/drivers/char/moxa.c b/drivers/char/moxa.c index 4db1dc468a11..80a2bdf7b92c 100644 --- a/drivers/char/moxa.c +++ b/drivers/char/moxa.c | |||
@@ -194,9 +194,9 @@ static int verbose = 0; | |||
194 | static int ttymajor = MOXAMAJOR; | 194 | static int ttymajor = MOXAMAJOR; |
195 | /* Variables for insmod */ | 195 | /* Variables for insmod */ |
196 | #ifdef MODULE | 196 | #ifdef MODULE |
197 | static int baseaddr[] = {0, 0, 0, 0}; | 197 | static int baseaddr[4]; |
198 | static int type[] = {0, 0, 0, 0}; | 198 | static int type[4]; |
199 | static int numports[] = {0, 0, 0, 0}; | 199 | static int numports[4]; |
200 | #endif | 200 | #endif |
201 | 201 | ||
202 | MODULE_AUTHOR("William Chen"); | 202 | MODULE_AUTHOR("William Chen"); |
@@ -348,10 +348,7 @@ static int __init moxa_init(void) | |||
348 | moxaDriver->type = TTY_DRIVER_TYPE_SERIAL; | 348 | moxaDriver->type = TTY_DRIVER_TYPE_SERIAL; |
349 | moxaDriver->subtype = SERIAL_TYPE_NORMAL; | 349 | moxaDriver->subtype = SERIAL_TYPE_NORMAL; |
350 | moxaDriver->init_termios = tty_std_termios; | 350 | moxaDriver->init_termios = tty_std_termios; |
351 | moxaDriver->init_termios.c_iflag = 0; | ||
352 | moxaDriver->init_termios.c_oflag = 0; | ||
353 | moxaDriver->init_termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL | HUPCL; | 351 | moxaDriver->init_termios.c_cflag = B9600 | CS8 | CREAD | CLOCAL | HUPCL; |
354 | moxaDriver->init_termios.c_lflag = 0; | ||
355 | moxaDriver->init_termios.c_ispeed = 9600; | 352 | moxaDriver->init_termios.c_ispeed = 9600; |
356 | moxaDriver->init_termios.c_ospeed = 9600; | 353 | moxaDriver->init_termios.c_ospeed = 9600; |
357 | moxaDriver->flags = TTY_DRIVER_REAL_RAW; | 354 | moxaDriver->flags = TTY_DRIVER_REAL_RAW; |
@@ -361,25 +358,13 @@ static int __init moxa_init(void) | |||
361 | ch->type = PORT_16550A; | 358 | ch->type = PORT_16550A; |
362 | ch->port = i; | 359 | ch->port = i; |
363 | INIT_WORK(&ch->tqueue, do_moxa_softint); | 360 | INIT_WORK(&ch->tqueue, do_moxa_softint); |
364 | ch->tty = NULL; | ||
365 | ch->close_delay = 5 * HZ / 10; | 361 | ch->close_delay = 5 * HZ / 10; |
366 | ch->closing_wait = 30 * HZ; | 362 | ch->closing_wait = 30 * HZ; |
367 | ch->count = 0; | ||
368 | ch->blocked_open = 0; | ||
369 | ch->cflag = B9600 | CS8 | CREAD | CLOCAL | HUPCL; | 363 | ch->cflag = B9600 | CS8 | CREAD | CLOCAL | HUPCL; |
370 | init_waitqueue_head(&ch->open_wait); | 364 | init_waitqueue_head(&ch->open_wait); |
371 | init_waitqueue_head(&ch->close_wait); | 365 | init_waitqueue_head(&ch->close_wait); |
372 | } | 366 | } |
373 | 367 | ||
374 | for (i = 0; i < MAX_BOARDS; i++) { | ||
375 | moxa_boards[i].boardType = 0; | ||
376 | moxa_boards[i].numPorts = 0; | ||
377 | moxa_boards[i].baseAddr = 0; | ||
378 | moxa_boards[i].busType = 0; | ||
379 | moxa_boards[i].pciInfo.busNum = 0; | ||
380 | moxa_boards[i].pciInfo.devNum = 0; | ||
381 | } | ||
382 | MoxaDriverInit(); | ||
383 | printk("Tty devices major number = %d\n", ttymajor); | 368 | printk("Tty devices major number = %d\n", ttymajor); |
384 | 369 | ||
385 | if (tty_register_driver(moxaDriver)) { | 370 | if (tty_register_driver(moxaDriver)) { |
@@ -391,7 +376,6 @@ static int __init moxa_init(void) | |||
391 | init_timer(&moxaEmptyTimer[i]); | 376 | init_timer(&moxaEmptyTimer[i]); |
392 | moxaEmptyTimer[i].function = check_xmit_empty; | 377 | moxaEmptyTimer[i].function = check_xmit_empty; |
393 | moxaEmptyTimer[i].data = (unsigned long) & moxaChannels[i]; | 378 | moxaEmptyTimer[i].data = (unsigned long) & moxaChannels[i]; |
394 | moxaEmptyTimer_on[i] = 0; | ||
395 | } | 379 | } |
396 | 380 | ||
397 | init_timer(&moxaTimer); | 381 | init_timer(&moxaTimer); |
@@ -1470,7 +1454,7 @@ static char moxaLowChkFlag[MAX_PORTS]; | |||
1470 | static int moxaLowWaterChk; | 1454 | static int moxaLowWaterChk; |
1471 | static int moxaCard; | 1455 | static int moxaCard; |
1472 | static mon_st moxaLog; | 1456 | static mon_st moxaLog; |
1473 | static int moxaFuncTout; | 1457 | static int moxaFuncTout = HZ / 2; |
1474 | static ushort moxaBreakCnt[MAX_PORTS]; | 1458 | static ushort moxaBreakCnt[MAX_PORTS]; |
1475 | 1459 | ||
1476 | static void moxadelay(int); | 1460 | static void moxadelay(int); |