diff options
Diffstat (limited to 'drivers/tty/moxa.c')
-rw-r--r-- | drivers/tty/moxa.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/tty/moxa.c b/drivers/tty/moxa.c index 324467d28a54..89cc9344325b 100644 --- a/drivers/tty/moxa.c +++ b/drivers/tty/moxa.c | |||
@@ -367,10 +367,10 @@ static int moxa_ioctl(struct tty_struct *tty, | |||
367 | tmp.dcd = 1; | 367 | tmp.dcd = 1; |
368 | 368 | ||
369 | ttyp = tty_port_tty_get(&p->port); | 369 | ttyp = tty_port_tty_get(&p->port); |
370 | if (!ttyp || !ttyp->termios) | 370 | if (!ttyp) |
371 | tmp.cflag = p->cflag; | 371 | tmp.cflag = p->cflag; |
372 | else | 372 | else |
373 | tmp.cflag = ttyp->termios->c_cflag; | 373 | tmp.cflag = ttyp->termios.c_cflag; |
374 | tty_kref_put(ttyp); | 374 | tty_kref_put(ttyp); |
375 | copy: | 375 | copy: |
376 | if (copy_to_user(argm, &tmp, sizeof(tmp))) | 376 | if (copy_to_user(argm, &tmp, sizeof(tmp))) |
@@ -1178,7 +1178,7 @@ static int moxa_open(struct tty_struct *tty, struct file *filp) | |||
1178 | mutex_lock(&ch->port.mutex); | 1178 | mutex_lock(&ch->port.mutex); |
1179 | if (!(ch->port.flags & ASYNC_INITIALIZED)) { | 1179 | if (!(ch->port.flags & ASYNC_INITIALIZED)) { |
1180 | ch->statusflags = 0; | 1180 | ch->statusflags = 0; |
1181 | moxa_set_tty_param(tty, tty->termios); | 1181 | moxa_set_tty_param(tty, &tty->termios); |
1182 | MoxaPortLineCtrl(ch, 1, 1); | 1182 | MoxaPortLineCtrl(ch, 1, 1); |
1183 | MoxaPortEnable(ch); | 1183 | MoxaPortEnable(ch); |
1184 | MoxaSetFifo(ch, ch->type == PORT_16550A); | 1184 | MoxaSetFifo(ch, ch->type == PORT_16550A); |
@@ -1193,7 +1193,7 @@ static int moxa_open(struct tty_struct *tty, struct file *filp) | |||
1193 | static void moxa_close(struct tty_struct *tty, struct file *filp) | 1193 | static void moxa_close(struct tty_struct *tty, struct file *filp) |
1194 | { | 1194 | { |
1195 | struct moxa_port *ch = tty->driver_data; | 1195 | struct moxa_port *ch = tty->driver_data; |
1196 | ch->cflag = tty->termios->c_cflag; | 1196 | ch->cflag = tty->termios.c_cflag; |
1197 | tty_port_close(&ch->port, tty, filp); | 1197 | tty_port_close(&ch->port, tty, filp); |
1198 | } | 1198 | } |
1199 | 1199 | ||
@@ -1464,7 +1464,7 @@ static void moxa_poll(unsigned long ignored) | |||
1464 | 1464 | ||
1465 | static void moxa_set_tty_param(struct tty_struct *tty, struct ktermios *old_termios) | 1465 | static void moxa_set_tty_param(struct tty_struct *tty, struct ktermios *old_termios) |
1466 | { | 1466 | { |
1467 | register struct ktermios *ts = tty->termios; | 1467 | register struct ktermios *ts = &tty->termios; |
1468 | struct moxa_port *ch = tty->driver_data; | 1468 | struct moxa_port *ch = tty->driver_data; |
1469 | int rts, cts, txflow, rxflow, xany, baud; | 1469 | int rts, cts, txflow, rxflow, xany, baud; |
1470 | 1470 | ||