summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorGabriel Somlo <gsomlo@gmail.com>2022-11-23 08:04:52 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-01-19 14:59:40 +0100
commit2ee91d42bf5ac2f2f2862d06f7344ffe89d4a032 (patch)
tree741980631ce6bd4559e2c5e9b27c94619a737d6b /drivers
parentb9f5a18a9d7c4c41325c72971abec19278c7c6e6 (diff)
downloadlinux-stable-2ee91d42bf5ac2f2f2862d06f7344ffe89d4a032.tar.gz
linux-stable-2ee91d42bf5ac2f2f2862d06f7344ffe89d4a032.tar.bz2
linux-stable-2ee91d42bf5ac2f2f2862d06f7344ffe89d4a032.zip
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: Gabriel Somlo <gsomlo@gmail.com> Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org> Reviewed-by: Jiri Slaby <jirislaby@kernel.org> Link: https://lore.kernel.org/r/20221123130500.1030189-7-gsomlo@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/tty/serial/liteuart.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/tty/serial/liteuart.c b/drivers/tty/serial/liteuart.c
index 1e3429bcc2ad..81a86c5eb393 100644
--- a/drivers/tty/serial/liteuart.c
+++ b/drivers/tty/serial/liteuart.c
@@ -87,10 +87,10 @@ static void liteuart_timer(struct timer_list *t)
/* no overflow bits in status */
if (!(uart_handle_sysrq_char(port, ch)))
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));
}