serial: liteuart: simplify passing of uart_insert_char() flag
authorGabriel Somlo <gsomlo@gmail.com>
Wed, 23 Nov 2022 13:04:54 +0000 (08:04 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 19 Jan 2023 13:59:40 +0000 (14:59 +0100)
Simply provide the hard-coded TTY_NORMAL flag to uart_insert_char()
directly -- no need to dedicate a variable for that exclusive purpose.

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-9-gsomlo@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/liteuart.c

index c90ab65fbdcfbec307f5c0152f41dff7eb3bf8b9..81aa7c1da73c9726f92263b7aa7caad89c0ed4b2 100644 (file)
@@ -73,7 +73,6 @@ static void liteuart_timer(struct timer_list *t)
        struct liteuart_port *uart = from_timer(uart, t, timer);
        struct uart_port *port = &uart->port;
        unsigned char __iomem *membase = port->membase;
-       unsigned int flg = TTY_NORMAL;
        int ch;
        unsigned long status;
 
@@ -86,7 +85,7 @@ 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);
+                       uart_insert_char(port, status, 0, ch, TTY_NORMAL);
        }
 
        tty_flip_buffer_push(&port->state->port);