aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/ioc3_serial.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/tty/serial/ioc3_serial.c')
-rw-r--r--drivers/tty/serial/ioc3_serial.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/tty/serial/ioc3_serial.c b/drivers/tty/serial/ioc3_serial.c
index d8f1d1d54471..6e4c715c5d26 100644
--- a/drivers/tty/serial/ioc3_serial.c
+++ b/drivers/tty/serial/ioc3_serial.c
@@ -1000,7 +1000,7 @@ ioc3_change_speed(struct uart_port *the_port,
1000 1000
1001 the_port->ignore_status_mask = N_ALL_INPUT; 1001 the_port->ignore_status_mask = N_ALL_INPUT;
1002 1002
1003 state->port.tty->low_latency = 1; 1003 state->port.low_latency = 1;
1004 1004
1005 if (iflag & IGNPAR) 1005 if (iflag & IGNPAR)
1006 the_port->ignore_status_mask &= ~(N_PARITY_ERROR 1006 the_port->ignore_status_mask &= ~(N_PARITY_ERROR
@@ -1393,7 +1393,6 @@ static inline int do_read(struct uart_port *the_port, char *buf, int len)
1393 */ 1393 */
1394static int receive_chars(struct uart_port *the_port) 1394static int receive_chars(struct uart_port *the_port)
1395{ 1395{
1396 struct tty_struct *tty;
1397 unsigned char ch[MAX_CHARS]; 1396 unsigned char ch[MAX_CHARS];
1398 int read_count = 0, read_room, flip = 0; 1397 int read_count = 0, read_room, flip = 0;
1399 struct uart_state *state = the_port->state; 1398 struct uart_state *state = the_port->state;
@@ -1403,25 +1402,23 @@ static int receive_chars(struct uart_port *the_port)
1403 /* Make sure all the pointers are "good" ones */ 1402 /* Make sure all the pointers are "good" ones */
1404 if (!state) 1403 if (!state)
1405 return 0; 1404 return 0;
1406 if (!state->port.tty)
1407 return 0;
1408 1405
1409 if (!(port->ip_flags & INPUT_ENABLE)) 1406 if (!(port->ip_flags & INPUT_ENABLE))
1410 return 0; 1407 return 0;
1411 1408
1412 spin_lock_irqsave(&the_port->lock, pflags); 1409 spin_lock_irqsave(&the_port->lock, pflags);
1413 tty = state->port.tty;
1414 1410
1415 read_count = do_read(the_port, ch, MAX_CHARS); 1411 read_count = do_read(the_port, ch, MAX_CHARS);
1416 if (read_count > 0) { 1412 if (read_count > 0) {
1417 flip = 1; 1413 flip = 1;
1418 read_room = tty_insert_flip_string(tty, ch, read_count); 1414 read_room = tty_insert_flip_string(&state->port, ch,
1415 read_count);
1419 the_port->icount.rx += read_count; 1416 the_port->icount.rx += read_count;
1420 } 1417 }
1421 spin_unlock_irqrestore(&the_port->lock, pflags); 1418 spin_unlock_irqrestore(&the_port->lock, pflags);
1422 1419
1423 if (flip) 1420 if (flip)
1424 tty_flip_buffer_push(tty); 1421 tty_flip_buffer_push(&state->port);
1425 1422
1426 return read_count; 1423 return read_count;
1427} 1424}