diff options
Diffstat (limited to 'drivers/tty/serial/jsm/jsm_tty.c')
-rw-r--r-- | drivers/tty/serial/jsm/jsm_tty.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/drivers/tty/serial/jsm/jsm_tty.c b/drivers/tty/serial/jsm/jsm_tty.c index 4c00c5550b1a..00f250ae14c5 100644 --- a/drivers/tty/serial/jsm/jsm_tty.c +++ b/drivers/tty/serial/jsm/jsm_tty.c | |||
@@ -521,6 +521,7 @@ void jsm_input(struct jsm_channel *ch) | |||
521 | { | 521 | { |
522 | struct jsm_board *bd; | 522 | struct jsm_board *bd; |
523 | struct tty_struct *tp; | 523 | struct tty_struct *tp; |
524 | struct tty_port *port; | ||
524 | u32 rmask; | 525 | u32 rmask; |
525 | u16 head; | 526 | u16 head; |
526 | u16 tail; | 527 | u16 tail; |
@@ -536,7 +537,8 @@ void jsm_input(struct jsm_channel *ch) | |||
536 | if (!ch) | 537 | if (!ch) |
537 | return; | 538 | return; |
538 | 539 | ||
539 | tp = ch->uart_port.state->port.tty; | 540 | port = &ch->uart_port.state->port; |
541 | tp = port->tty; | ||
540 | 542 | ||
541 | bd = ch->ch_bd; | 543 | bd = ch->ch_bd; |
542 | if(!bd) | 544 | if(!bd) |
@@ -600,7 +602,7 @@ void jsm_input(struct jsm_channel *ch) | |||
600 | return; | 602 | return; |
601 | } | 603 | } |
602 | 604 | ||
603 | len = tty_buffer_request_room(tp, data_len); | 605 | len = tty_buffer_request_room(port, data_len); |
604 | n = len; | 606 | n = len; |
605 | 607 | ||
606 | /* | 608 | /* |
@@ -629,16 +631,16 @@ void jsm_input(struct jsm_channel *ch) | |||
629 | * format it likes. | 631 | * format it likes. |
630 | */ | 632 | */ |
631 | if (*(ch->ch_equeue +tail +i) & UART_LSR_BI) | 633 | if (*(ch->ch_equeue +tail +i) & UART_LSR_BI) |
632 | tty_insert_flip_char(tp, *(ch->ch_rqueue +tail +i), TTY_BREAK); | 634 | tty_insert_flip_char(port, *(ch->ch_rqueue +tail +i), TTY_BREAK); |
633 | else if (*(ch->ch_equeue +tail +i) & UART_LSR_PE) | 635 | else if (*(ch->ch_equeue +tail +i) & UART_LSR_PE) |
634 | tty_insert_flip_char(tp, *(ch->ch_rqueue +tail +i), TTY_PARITY); | 636 | tty_insert_flip_char(port, *(ch->ch_rqueue +tail +i), TTY_PARITY); |
635 | else if (*(ch->ch_equeue +tail +i) & UART_LSR_FE) | 637 | else if (*(ch->ch_equeue +tail +i) & UART_LSR_FE) |
636 | tty_insert_flip_char(tp, *(ch->ch_rqueue +tail +i), TTY_FRAME); | 638 | tty_insert_flip_char(port, *(ch->ch_rqueue +tail +i), TTY_FRAME); |
637 | else | 639 | else |
638 | tty_insert_flip_char(tp, *(ch->ch_rqueue +tail +i), TTY_NORMAL); | 640 | tty_insert_flip_char(port, *(ch->ch_rqueue +tail +i), TTY_NORMAL); |
639 | } | 641 | } |
640 | } else { | 642 | } else { |
641 | tty_insert_flip_string(tp, ch->ch_rqueue + tail, s) ; | 643 | tty_insert_flip_string(port, ch->ch_rqueue + tail, s); |
642 | } | 644 | } |
643 | tail += s; | 645 | tail += s; |
644 | n -= s; | 646 | n -= s; |
@@ -652,7 +654,7 @@ void jsm_input(struct jsm_channel *ch) | |||
652 | spin_unlock_irqrestore(&ch->ch_lock, lock_flags); | 654 | spin_unlock_irqrestore(&ch->ch_lock, lock_flags); |
653 | 655 | ||
654 | /* Tell the tty layer its okay to "eat" the data now */ | 656 | /* Tell the tty layer its okay to "eat" the data now */ |
655 | tty_flip_buffer_push(tp); | 657 | tty_flip_buffer_push(port); |
656 | 658 | ||
657 | jsm_dbg(IOCTL, &ch->ch_bd->pci_dev, "finish\n"); | 659 | jsm_dbg(IOCTL, &ch->ch_bd->pci_dev, "finish\n"); |
658 | } | 660 | } |