diff options
Diffstat (limited to 'drivers/tty/serial/ioc3_serial.c')
-rw-r--r-- | drivers/tty/serial/ioc3_serial.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/tty/serial/ioc3_serial.c b/drivers/tty/serial/ioc3_serial.c index edbdc4e45075..6e4c715c5d26 100644 --- a/drivers/tty/serial/ioc3_serial.c +++ b/drivers/tty/serial/ioc3_serial.c | |||
@@ -1393,7 +1393,6 @@ static inline int do_read(struct uart_port *the_port, char *buf, int len) | |||
1393 | */ | 1393 | */ |
1394 | static int receive_chars(struct uart_port *the_port) | 1394 | static 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,14 +1402,11 @@ 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) { |
@@ -1422,7 +1418,7 @@ static int receive_chars(struct uart_port *the_port) | |||
1422 | spin_unlock_irqrestore(&the_port->lock, pflags); | 1418 | spin_unlock_irqrestore(&the_port->lock, pflags); |
1423 | 1419 | ||
1424 | if (flip) | 1420 | if (flip) |
1425 | tty_flip_buffer_push(tty); | 1421 | tty_flip_buffer_push(&state->port); |
1426 | 1422 | ||
1427 | return read_count; | 1423 | return read_count; |
1428 | } | 1424 | } |