aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/sunsu.c
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2013-01-03 09:53:03 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-01-16 01:21:36 -0500
commit92a19f9cec9a80ad93c06e115822deb729e2c6ad (patch)
tree80e1550ac1647a1cdf20a0b568554c0c50a63f75 /drivers/tty/serial/sunsu.c
parent2f69335710884ae6112fc8196ebe29b5cda7b79b (diff)
TTY: switch tty_insert_flip_char
Now, we start converting tty buffer functions to actually use tty_port. This will allow us to get rid of the need of tty in many call sites. Only tty_port will needed and hence no more tty_port_tty_get in those paths. tty_insert_flip_char is the next one to proceed. This one is used all over the code, so the patch is huge. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/sunsu.c')
-rw-r--r--drivers/tty/serial/sunsu.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/tty/serial/sunsu.c b/drivers/tty/serial/sunsu.c
index 220da3f9724f..52325968b06c 100644
--- a/drivers/tty/serial/sunsu.c
+++ b/drivers/tty/serial/sunsu.c
@@ -318,7 +318,8 @@ static void sunsu_enable_ms(struct uart_port *port)
318static struct tty_struct * 318static struct tty_struct *
319receive_chars(struct uart_sunsu_port *up, unsigned char *status) 319receive_chars(struct uart_sunsu_port *up, unsigned char *status)
320{ 320{
321 struct tty_struct *tty = up->port.state->port.tty; 321 struct tty_port *port = &up->port.state->port;
322 struct tty_struct *tty = port->tty;
322 unsigned char ch, flag; 323 unsigned char ch, flag;
323 int max_count = 256; 324 int max_count = 256;
324 int saw_console_brk = 0; 325 int saw_console_brk = 0;
@@ -376,14 +377,14 @@ receive_chars(struct uart_sunsu_port *up, unsigned char *status)
376 if (uart_handle_sysrq_char(&up->port, ch)) 377 if (uart_handle_sysrq_char(&up->port, ch))
377 goto ignore_char; 378 goto ignore_char;
378 if ((*status & up->port.ignore_status_mask) == 0) 379 if ((*status & up->port.ignore_status_mask) == 0)
379 tty_insert_flip_char(tty, ch, flag); 380 tty_insert_flip_char(port, ch, flag);
380 if (*status & UART_LSR_OE) 381 if (*status & UART_LSR_OE)
381 /* 382 /*
382 * Overrun is special, since it's reported 383 * Overrun is special, since it's reported
383 * immediately, and doesn't affect the current 384 * immediately, and doesn't affect the current
384 * character. 385 * character.
385 */ 386 */
386 tty_insert_flip_char(tty, 0, TTY_OVERRUN); 387 tty_insert_flip_char(port, 0, TTY_OVERRUN);
387 ignore_char: 388 ignore_char:
388 *status = serial_inp(up, UART_LSR); 389 *status = serial_inp(up, UART_LSR);
389 } while ((*status & UART_LSR_DR) && (max_count-- > 0)); 390 } while ((*status & UART_LSR_DR) && (max_count-- > 0));