aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/serial/serial_lh7a40x.c
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2005-05-09 18:21:59 -0400
committerRussell King <rmk@dyn-67.arm.linux.org.uk>2005-05-09 18:21:59 -0400
commit05ab3014636ff60a319d37cdf37dca594b015eec (patch)
treed9d948a5ecd5e10cd511ebca328df2ef08d5e076 /drivers/serial/serial_lh7a40x.c
parent88d7bd8cb9eb8d64bf7997600b0d64f7834047c5 (diff)
[PATCH] Serial: Add uart_insert_char()
Add uart_insert_char(), which handles inserting characters into the flip buffer. This helper function handles the correct semantics for handling overrun in addition to inserting normal characters. Signed-off-by: Russell King <rmk@arm.linux.org.uk>
Diffstat (limited to 'drivers/serial/serial_lh7a40x.c')
-rw-r--r--drivers/serial/serial_lh7a40x.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/serial/serial_lh7a40x.c b/drivers/serial/serial_lh7a40x.c
index 85cfa08d3bad..56f269b6bfb1 100644
--- a/drivers/serial/serial_lh7a40x.c
+++ b/drivers/serial/serial_lh7a40x.c
@@ -190,18 +190,7 @@ lh7a40xuart_rx_chars (struct uart_port* port)
190 if (uart_handle_sysrq_char (port, (unsigned char) data, regs)) 190 if (uart_handle_sysrq_char (port, (unsigned char) data, regs))
191 continue; 191 continue;
192 192
193 if ((data & port->ignore_status_mask) == 0) { 193 uart_insert_char(port, data, RxOverrunError, data, flag);
194 tty_insert_flip_char(tty, data, flag);
195 }
196 if ((data & RxOverrunError)
197 && tty->flip.count < TTY_FLIPBUF_SIZE) {
198 /*
199 * Overrun is special, since it's reported
200 * immediately, and doesn't affect the current
201 * character
202 */
203 tty_insert_flip_char(tty, 0, TTY_OVERRUN);
204 }
205 } 194 }
206 tty_flip_buffer_push (tty); 195 tty_flip_buffer_push (tty);
207 return; 196 return;