aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/moxa.c
diff options
context:
space:
mode:
authorJiri Slaby <jirislaby@gmail.com>2008-04-30 03:53:41 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-30 11:29:42 -0400
commit97506056bdf0f230854142ffa986c616a0a5536e (patch)
treeee3022586cd693be82277a49714e22ca468b845b /drivers/char/moxa.c
parentb4173f45758a5b5185acb302c507289e661d9419 (diff)
Char: moxa, remove unused port entries
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>
Diffstat (limited to 'drivers/char/moxa.c')
-rw-r--r--drivers/char/moxa.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/drivers/char/moxa.c b/drivers/char/moxa.c
index ae5433c58161..c440ec542686 100644
--- a/drivers/char/moxa.c
+++ b/drivers/char/moxa.c
@@ -131,10 +131,8 @@ struct moxa_port {
131 struct moxa_board_conf *board; 131 struct moxa_board_conf *board;
132 int type; 132 int type;
133 int close_delay; 133 int close_delay;
134 unsigned short closing_wait;
135 int count; 134 int count;
136 int blocked_open; 135 int blocked_open;
137 long event; /* long req'd for set_bit --RR */
138 int asyncflags; 136 int asyncflags;
139 unsigned long statusflags; 137 unsigned long statusflags;
140 struct tty_struct *tty; 138 struct tty_struct *tty;
@@ -147,7 +145,6 @@ struct moxa_port {
147 char chkPort; 145 char chkPort;
148 char lineCtrl; 146 char lineCtrl;
149 void __iomem *tableAddr; 147 void __iomem *tableAddr;
150 long curBaud;
151 char DCDState; 148 char DCDState;
152 char lowChkFlag; 149 char lowChkFlag;
153 150
@@ -515,7 +512,6 @@ static int moxa_load_code(struct moxa_board_conf *brd, const void *ptr,
515 for (i = 0; i < brd->numPorts; i++, port++) { 512 for (i = 0; i < brd->numPorts; i++, port++) {
516 port->board = brd; 513 port->board = brd;
517 port->chkPort = 1; 514 port->chkPort = 1;
518 port->curBaud = 9600L;
519 port->DCDState = 0; 515 port->DCDState = 0;
520 port->tableAddr = baseAddr + Extern_table + 516 port->tableAddr = baseAddr + Extern_table +
521 Extern_size * i; 517 Extern_size * i;
@@ -535,7 +531,6 @@ static int moxa_load_code(struct moxa_board_conf *brd, const void *ptr,
535 for (i = 0; i < brd->numPorts; i++, port++) { 531 for (i = 0; i < brd->numPorts; i++, port++) {
536 port->board = brd; 532 port->board = brd;
537 port->chkPort = 1; 533 port->chkPort = 1;
538 port->curBaud = 9600L;
539 port->DCDState = 0; 534 port->DCDState = 0;
540 port->tableAddr = baseAddr + Extern_table + 535 port->tableAddr = baseAddr + Extern_table +
541 Extern_size * i; 536 Extern_size * i;
@@ -823,7 +818,6 @@ static int __init moxa_init(void)
823 for (i = 0, ch = moxa_ports; i < MAX_PORTS; i++, ch++) { 818 for (i = 0, ch = moxa_ports; i < MAX_PORTS; i++, ch++) {
824 ch->type = PORT_16550A; 819 ch->type = PORT_16550A;
825 ch->close_delay = 5 * HZ / 10; 820 ch->close_delay = 5 * HZ / 10;
826 ch->closing_wait = 30 * HZ;
827 ch->cflag = B9600 | CS8 | CREAD | CLOCAL | HUPCL; 821 ch->cflag = B9600 | CS8 | CREAD | CLOCAL | HUPCL;
828 init_waitqueue_head(&ch->open_wait); 822 init_waitqueue_head(&ch->open_wait);
829 init_completion(&ch->close_wait); 823 init_completion(&ch->close_wait);
@@ -1006,7 +1000,6 @@ static void moxa_close(struct tty_struct *tty, struct file *filp)
1006 tty_ldisc_flush(tty); 1000 tty_ldisc_flush(tty);
1007 1001
1008 tty->closing = 0; 1002 tty->closing = 0;
1009 ch->event = 0;
1010 ch->tty = NULL; 1003 ch->tty = NULL;
1011 if (ch->blocked_open) { 1004 if (ch->blocked_open) {
1012 if (ch->close_delay) { 1005 if (ch->close_delay) {
@@ -1270,7 +1263,6 @@ static void moxa_hangup(struct tty_struct *tty)
1270 1263
1271 moxa_flush_buffer(tty); 1264 moxa_flush_buffer(tty);
1272 moxa_shut_down(ch); 1265 moxa_shut_down(ch);
1273 ch->event = 0;
1274 ch->count = 0; 1266 ch->count = 0;
1275 ch->asyncflags &= ~ASYNC_NORMAL_ACTIVE; 1267 ch->asyncflags &= ~ASYNC_NORMAL_ACTIVE;
1276 ch->tty = NULL; 1268 ch->tty = NULL;
@@ -2079,7 +2071,6 @@ static long MoxaPortSetBaud(struct moxa_port *port, long baud)
2079 val = clock / baud; 2071 val = clock / baud;
2080 moxafunc(ofsAddr, FC_SetBaud, val); 2072 moxafunc(ofsAddr, FC_SetBaud, val);
2081 baud = clock / val; 2073 baud = clock / val;
2082 port->curBaud = baud;
2083 return (baud); 2074 return (baud);
2084} 2075}
2085 2076
@@ -2457,7 +2448,6 @@ static int moxa_get_serial_info(struct moxa_port *info,
2457 tmp.flags = info->asyncflags; 2448 tmp.flags = info->asyncflags;
2458 tmp.baud_base = 921600; 2449 tmp.baud_base = 921600;
2459 tmp.close_delay = info->close_delay; 2450 tmp.close_delay = info->close_delay;
2460 tmp.closing_wait = info->closing_wait;
2461 tmp.custom_divisor = 0; 2451 tmp.custom_divisor = 0;
2462 tmp.hub6 = 0; 2452 tmp.hub6 = 0;
2463 if(copy_to_user(retinfo, &tmp, sizeof(*retinfo))) 2453 if(copy_to_user(retinfo, &tmp, sizeof(*retinfo)))
@@ -2487,7 +2477,6 @@ static int moxa_set_serial_info(struct moxa_port *info,
2487 return (-EPERM); 2477 return (-EPERM);
2488 } else { 2478 } else {
2489 info->close_delay = new_serial.close_delay * HZ / 100; 2479 info->close_delay = new_serial.close_delay * HZ / 100;
2490 info->closing_wait = new_serial.closing_wait * HZ / 100;
2491 } 2480 }
2492 2481
2493 new_serial.flags = (new_serial.flags & ~ASYNC_FLAGS); 2482 new_serial.flags = (new_serial.flags & ~ASYNC_FLAGS);