mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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>
This commit is contained in:
parent
2f69335710
commit
92a19f9cec
76 changed files with 297 additions and 286 deletions
|
@ -300,7 +300,8 @@ static void m32r_sio_enable_ms(struct uart_port *port)
|
|||
|
||||
static void receive_chars(struct uart_sio_port *up, int *status)
|
||||
{
|
||||
struct tty_struct *tty = up->port.state->port.tty;
|
||||
struct tty_port *port = &up->port.state->port;
|
||||
struct tty_struct *tty = tport->tty;
|
||||
unsigned char ch;
|
||||
unsigned char flag;
|
||||
int max_count = 256;
|
||||
|
@ -355,7 +356,7 @@ static void receive_chars(struct uart_sio_port *up, int *status)
|
|||
if (uart_handle_sysrq_char(&up->port, ch))
|
||||
goto ignore_char;
|
||||
if ((*status & up->port.ignore_status_mask) == 0)
|
||||
tty_insert_flip_char(tty, ch, flag);
|
||||
tty_insert_flip_char(port, ch, flag);
|
||||
|
||||
if (*status & UART_LSR_OE) {
|
||||
/*
|
||||
|
@ -363,7 +364,7 @@ static void receive_chars(struct uart_sio_port *up, int *status)
|
|||
* immediately, and doesn't affect the current
|
||||
* character.
|
||||
*/
|
||||
tty_insert_flip_char(tty, 0, TTY_OVERRUN);
|
||||
tty_insert_flip_char(port, 0, TTY_OVERRUN);
|
||||
}
|
||||
ignore_char:
|
||||
*status = serial_in(up, UART_LSR);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue