aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/moxa.c
diff options
context:
space:
mode:
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 {
135 void __iomem *tableAddr; 135 void __iomem *tableAddr;
136 136
137 int type; 137 int type;
138 int close_delay;
139 int cflag; 138 int cflag;
140 unsigned long statusflags; 139 unsigned long statusflags;
141 140
@@ -822,10 +821,9 @@ static int moxa_init_board(struct moxa_board_conf *brd, struct device *dev)
822 } 821 }
823 822
824 for (i = 0, p = brd->ports; i < MAX_PORTS_PER_BOARD; i++, p++) { 823 for (i = 0, p = brd->ports; i < MAX_PORTS_PER_BOARD; i++, p++) {
824 tty_port_init(&p->port);
825 p->type = PORT_16550A; 825 p->type = PORT_16550A;
826 p->close_delay = 5 * HZ / 10;
827 p->cflag = B9600 | CS8 | CREAD | CLOCAL | HUPCL; 826 p->cflag = B9600 | CS8 | CREAD | CLOCAL | HUPCL;
828 tty_port_init(&p->port);
829 } 827 }
830 828
831 switch (brd->boardType) { 829 switch (brd->boardType) {
@@ -2124,7 +2122,7 @@ static int moxa_get_serial_info(struct moxa_port *info,
2124 .line = info->port.tty->index, 2122 .line = info->port.tty->index,
2125 .flags = info->port.flags, 2123 .flags = info->port.flags,
2126 .baud_base = 921600, 2124 .baud_base = 921600,
2127 .close_delay = info->close_delay 2125 .close_delay = info->port.close_delay
2128 }; 2126 };
2129 return copy_to_user(retinfo, &tmp, sizeof(*retinfo)) ? -EFAULT : 0; 2127 return copy_to_user(retinfo, &tmp, sizeof(*retinfo)) ? -EFAULT : 0;
2130} 2128}
@@ -2148,7 +2146,7 @@ static int moxa_set_serial_info(struct moxa_port *info,
2148 (info->port.flags & ~ASYNC_USR_MASK))) 2146 (info->port.flags & ~ASYNC_USR_MASK)))
2149 return -EPERM; 2147 return -EPERM;
2150 } else 2148 } else
2151 info->close_delay = new_serial.close_delay * HZ / 100; 2149 info->port.close_delay = new_serial.close_delay * HZ / 100;
2152 2150
2153 new_serial.flags = (new_serial.flags & ~ASYNC_FLAGS); 2151 new_serial.flags = (new_serial.flags & ~ASYNC_FLAGS);
2154 new_serial.flags |= (info->port.flags & ASYNC_FLAGS); 2152 new_serial.flags |= (info->port.flags & ASYNC_FLAGS);