Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

serial: liteuart: separate rx loop from poll timer

Convert the rx loop into its own dedicated function, and (for now)
call it from the poll timer. This is in preparation for adding irq
support to the receive path.

Signed-off-by: Gabriel Somlo <gsomlo@gmail.com>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Reviewed-by: Jiri Slaby <jirislaby@kernel.org>
Link: https://lore.kernel.org/r/20221123130500.1030189-11-gsomlo@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Gabriel Somlo and committed by
Greg Kroah-Hartman
5dcceabe a774aa45

+9 -3
+9 -3
drivers/tty/serial/liteuart.c
··· 68 68 #endif 69 69 }; 70 70 71 - static void liteuart_timer(struct timer_list *t) 71 + static void liteuart_rx_chars(struct uart_port *port) 72 72 { 73 - struct liteuart_port *uart = from_timer(uart, t, timer); 74 - struct uart_port *port = &uart->port; 75 73 unsigned char __iomem *membase = port->membase; 76 74 u8 ch; 77 75 ··· 86 88 } 87 89 88 90 tty_flip_buffer_push(&port->state->port); 91 + } 92 + 93 + static void liteuart_timer(struct timer_list *t) 94 + { 95 + struct liteuart_port *uart = from_timer(uart, t, timer); 96 + struct uart_port *port = &uart->port; 97 + 98 + liteuart_rx_chars(port); 89 99 90 100 mod_timer(&uart->timer, jiffies + uart_poll_timeout(port)); 91 101 }