tty: cpm_uart, use port->flags instead of low_latency
authorJiri Slaby <jslaby@suse.cz>
Tue, 5 Jan 2021 12:02:37 +0000 (13:02 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 7 Jan 2021 15:17:31 +0000 (16:17 +0100)
This is the only in-kernel user of tty_port::low_latency. Switch this
last one to test uport->flags directly as tty_port::low_latency is going
away in the next patch.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Link: https://lore.kernel.org/r/20210105120239.28031-10-jslaby@suse.cz
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/cpm_uart/cpm_uart_core.c

index 3b899cc7e3620374266e6647e3769ffdb83d7d6b..58aaa533203bde9f3db59a9fb983bcd803810afe 100644 (file)
@@ -499,8 +499,7 @@ static void cpm_uart_set_termios(struct uart_port *port,
        pr_debug("CPM uart[%d]:set_termios\n", port->line);
 
        baud = uart_get_baud_rate(port, termios, old, 0, port->uartclk / 16);
-       if (baud < HW_BUF_SPD_THRESHOLD ||
-           (pinfo->port.state && pinfo->port.state->port.low_latency))
+       if (baud < HW_BUF_SPD_THRESHOLD || port->flags & UPF_LOW_LATENCY)
                pinfo->rx_fifosize = 1;
        else
                pinfo->rx_fifosize = RX_BUF_SIZE;