Commit 2ee91d42 authored by Gabriel Somlo's avatar Gabriel Somlo Committed by Greg Kroah-Hartman

serial: liteuart: move tty_flip_buffer_push() out of rx loop

Calling tty_flip_buffer_push() for each individual received character
is overkill. Move it out of the rx loop, and only call it once per
set of characters received together.
Signed-off-by: default avatarGabriel Somlo <gsomlo@gmail.com>
Reviewed-by: default avatarIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Reviewed-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
Reviewed-by: default avatarJiri Slaby <jirislaby@kernel.org>
Link: https://lore.kernel.org/r/20221123130500.1030189-7-gsomlo@gmail.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b9f5a18a
...@@ -87,10 +87,10 @@ static void liteuart_timer(struct timer_list *t) ...@@ -87,10 +87,10 @@ static void liteuart_timer(struct timer_list *t)
/* no overflow bits in status */ /* no overflow bits in status */
if (!(uart_handle_sysrq_char(port, ch))) if (!(uart_handle_sysrq_char(port, ch)))
uart_insert_char(port, status, 0, ch, flg); uart_insert_char(port, status, 0, ch, flg);
tty_flip_buffer_push(&port->state->port);
} }
tty_flip_buffer_push(&port->state->port);
mod_timer(&uart->timer, jiffies + uart_poll_timeout(port)); mod_timer(&uart->timer, jiffies + uart_poll_timeout(port));
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment