diff options
Diffstat (limited to 'drivers/tty/serial/sunsab.c')
-rw-r--r-- | drivers/tty/serial/sunsab.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/drivers/tty/serial/sunsab.c b/drivers/tty/serial/sunsab.c index bd8b3b634103..4abc4d43a8e8 100644 --- a/drivers/tty/serial/sunsab.c +++ b/drivers/tty/serial/sunsab.c | |||
@@ -111,6 +111,7 @@ static struct tty_struct * | |||
111 | receive_chars(struct uart_sunsab_port *up, | 111 | receive_chars(struct uart_sunsab_port *up, |
112 | union sab82532_irq_status *stat) | 112 | union sab82532_irq_status *stat) |
113 | { | 113 | { |
114 | struct tty_port *port = NULL; | ||
114 | struct tty_struct *tty = NULL; | 115 | struct tty_struct *tty = NULL; |
115 | unsigned char buf[32]; | 116 | unsigned char buf[32]; |
116 | int saw_console_brk = 0; | 117 | int saw_console_brk = 0; |
@@ -118,8 +119,10 @@ receive_chars(struct uart_sunsab_port *up, | |||
118 | int count = 0; | 119 | int count = 0; |
119 | int i; | 120 | int i; |
120 | 121 | ||
121 | if (up->port.state != NULL) /* Unopened serial console */ | 122 | if (up->port.state != NULL) { /* Unopened serial console */ |
122 | tty = up->port.state->port.tty; | 123 | port = &up->port.state->port; |
124 | tty = port->tty; | ||
125 | } | ||
123 | 126 | ||
124 | /* Read number of BYTES (Character + Status) available. */ | 127 | /* Read number of BYTES (Character + Status) available. */ |
125 | if (stat->sreg.isr0 & SAB82532_ISR0_RPF) { | 128 | if (stat->sreg.isr0 & SAB82532_ISR0_RPF) { |
@@ -160,11 +163,6 @@ receive_chars(struct uart_sunsab_port *up, | |||
160 | for (i = 0; i < count; i++) { | 163 | for (i = 0; i < count; i++) { |
161 | unsigned char ch = buf[i], flag; | 164 | unsigned char ch = buf[i], flag; |
162 | 165 | ||
163 | if (tty == NULL) { | ||
164 | uart_handle_sysrq_char(&up->port, ch); | ||
165 | continue; | ||
166 | } | ||
167 | |||
168 | flag = TTY_NORMAL; | 166 | flag = TTY_NORMAL; |
169 | up->port.icount.rx++; | 167 | up->port.icount.rx++; |
170 | 168 | ||
@@ -213,9 +211,9 @@ receive_chars(struct uart_sunsab_port *up, | |||
213 | 211 | ||
214 | if ((stat->sreg.isr0 & (up->port.ignore_status_mask & 0xff)) == 0 && | 212 | if ((stat->sreg.isr0 & (up->port.ignore_status_mask & 0xff)) == 0 && |
215 | (stat->sreg.isr1 & ((up->port.ignore_status_mask >> 8) & 0xff)) == 0) | 213 | (stat->sreg.isr1 & ((up->port.ignore_status_mask >> 8) & 0xff)) == 0) |
216 | tty_insert_flip_char(tty, ch, flag); | 214 | tty_insert_flip_char(port, ch, flag); |
217 | if (stat->sreg.isr0 & SAB82532_ISR0_RFO) | 215 | if (stat->sreg.isr0 & SAB82532_ISR0_RFO) |
218 | tty_insert_flip_char(tty, 0, TTY_OVERRUN); | 216 | tty_insert_flip_char(port, 0, TTY_OVERRUN); |
219 | } | 217 | } |
220 | 218 | ||
221 | if (saw_console_brk) | 219 | if (saw_console_brk) |