summaryrefslogtreecommitdiffstats
path: root/drivers/char/moxa.c
diff options
context:
space:
mode:
authorAlan Cox <alan@redhat.com>2008-07-16 21:57:18 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-20 17:12:38 -0700
commit44b7d1b37f786c61d0e382b6f72f605f73de284b (patch)
tree2ac150e99311cde2e841bb6c80ac9d2800c8aff7 /drivers/char/moxa.c
parent593573bc55c9e1999b9679da4e477c0220a6fbbd (diff)
downloadlinux-44b7d1b37f786c61d0e382b6f72f605f73de284b.tar.bz2
tty: add more tty_port fields
Move more bits into the tty_port structure Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/char/moxa.c')
-rw-r--r--drivers/char/moxa.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/char/moxa.c b/drivers/char/moxa.c
index dd10f143d96f..2bba250ffc8e 100644
--- a/drivers/char/moxa.c
+++ b/drivers/char/moxa.c
@@ -135,7 +135,6 @@ struct moxa_port {
void __iomem *tableAddr;
int type;
- int close_delay;
int cflag;
unsigned long statusflags;
@@ -822,10 +821,9 @@ static int moxa_init_board(struct moxa_board_conf *brd, struct device *dev)
}
for (i = 0, p = brd->ports; i < MAX_PORTS_PER_BOARD; i++, p++) {
+ tty_port_init(&p->port);
p->type = PORT_16550A;
- p->close_delay = 5 * HZ / 10;
p->cflag = B9600 | CS8 | CREAD | CLOCAL | HUPCL;
- tty_port_init(&p->port);
}
switch (brd->boardType) {
@@ -2124,7 +2122,7 @@ static int moxa_get_serial_info(struct moxa_port *info,
.line = info->port.tty->index,
.flags = info->port.flags,
.baud_base = 921600,
- .close_delay = info->close_delay
+ .close_delay = info->port.close_delay
};
return copy_to_user(retinfo, &tmp, sizeof(*retinfo)) ? -EFAULT : 0;
}
@@ -2148,7 +2146,7 @@ static int moxa_set_serial_info(struct moxa_port *info,
(info->port.flags & ~ASYNC_USR_MASK)))
return -EPERM;
} else
- info->close_delay = new_serial.close_delay * HZ / 100;
+ info->port.close_delay = new_serial.close_delay * HZ / 100;
new_serial.flags = (new_serial.flags & ~ASYNC_FLAGS);
new_serial.flags |= (info->port.flags & ASYNC_FLAGS);