diff options
Diffstat (limited to 'drivers/tty/amiserial.c')
-rw-r--r-- | drivers/tty/amiserial.c | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/drivers/tty/amiserial.c b/drivers/tty/amiserial.c index 9d7d00cdfecb..fc700342d43f 100644 --- a/drivers/tty/amiserial.c +++ b/drivers/tty/amiserial.c | |||
@@ -251,7 +251,6 @@ static void receive_chars(struct serial_state *info) | |||
251 | { | 251 | { |
252 | int status; | 252 | int status; |
253 | int serdatr; | 253 | int serdatr; |
254 | struct tty_struct *tty = info->tport.tty; | ||
255 | unsigned char ch, flag; | 254 | unsigned char ch, flag; |
256 | struct async_icount *icount; | 255 | struct async_icount *icount; |
257 | int oe = 0; | 256 | int oe = 0; |
@@ -314,7 +313,7 @@ static void receive_chars(struct serial_state *info) | |||
314 | #endif | 313 | #endif |
315 | flag = TTY_BREAK; | 314 | flag = TTY_BREAK; |
316 | if (info->tport.flags & ASYNC_SAK) | 315 | if (info->tport.flags & ASYNC_SAK) |
317 | do_SAK(tty); | 316 | do_SAK(info->tport.tty); |
318 | } else if (status & UART_LSR_PE) | 317 | } else if (status & UART_LSR_PE) |
319 | flag = TTY_PARITY; | 318 | flag = TTY_PARITY; |
320 | else if (status & UART_LSR_FE) | 319 | else if (status & UART_LSR_FE) |
@@ -328,10 +327,10 @@ static void receive_chars(struct serial_state *info) | |||
328 | oe = 1; | 327 | oe = 1; |
329 | } | 328 | } |
330 | } | 329 | } |
331 | tty_insert_flip_char(tty, ch, flag); | 330 | tty_insert_flip_char(&info->tport, ch, flag); |
332 | if (oe == 1) | 331 | if (oe == 1) |
333 | tty_insert_flip_char(tty, 0, TTY_OVERRUN); | 332 | tty_insert_flip_char(&info->tport, 0, TTY_OVERRUN); |
334 | tty_flip_buffer_push(tty); | 333 | tty_flip_buffer_push(&info->tport); |
335 | out: | 334 | out: |
336 | return; | 335 | return; |
337 | } | 336 | } |
@@ -394,11 +393,6 @@ static void check_modem_status(struct serial_state *info) | |||
394 | icount->dsr++; | 393 | icount->dsr++; |
395 | if (dstatus & SER_DCD) { | 394 | if (dstatus & SER_DCD) { |
396 | icount->dcd++; | 395 | icount->dcd++; |
397 | #ifdef CONFIG_HARD_PPS | ||
398 | if ((port->flags & ASYNC_HARDPPS_CD) && | ||
399 | !(status & SER_DCD)) | ||
400 | hardpps(); | ||
401 | #endif | ||
402 | } | 396 | } |
403 | if (dstatus & SER_CTS) | 397 | if (dstatus & SER_CTS) |
404 | icount->cts++; | 398 | icount->cts++; |
@@ -1099,7 +1093,7 @@ static int set_serial_info(struct tty_struct *tty, struct serial_state *state, | |||
1099 | state->custom_divisor = new_serial.custom_divisor; | 1093 | state->custom_divisor = new_serial.custom_divisor; |
1100 | port->close_delay = new_serial.close_delay * HZ/100; | 1094 | port->close_delay = new_serial.close_delay * HZ/100; |
1101 | port->closing_wait = new_serial.closing_wait * HZ/100; | 1095 | port->closing_wait = new_serial.closing_wait * HZ/100; |
1102 | tty->low_latency = (port->flags & ASYNC_LOW_LATENCY) ? 1 : 0; | 1096 | port->low_latency = (port->flags & ASYNC_LOW_LATENCY) ? 1 : 0; |
1103 | 1097 | ||
1104 | check_and_exit: | 1098 | check_and_exit: |
1105 | if (port->flags & ASYNC_INITIALIZED) { | 1099 | if (port->flags & ASYNC_INITIALIZED) { |
@@ -1528,7 +1522,7 @@ static int rs_open(struct tty_struct *tty, struct file * filp) | |||
1528 | if (serial_paranoia_check(info, tty->name, "rs_open")) | 1522 | if (serial_paranoia_check(info, tty->name, "rs_open")) |
1529 | return -ENODEV; | 1523 | return -ENODEV; |
1530 | 1524 | ||
1531 | tty->low_latency = (port->flags & ASYNC_LOW_LATENCY) ? 1 : 0; | 1525 | port->low_latency = (port->flags & ASYNC_LOW_LATENCY) ? 1 : 0; |
1532 | 1526 | ||
1533 | retval = startup(tty, info); | 1527 | retval = startup(tty, info); |
1534 | if (retval) { | 1528 | if (retval) { |