diff options
author | Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> | 2022-06-24 23:54:24 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-06-27 14:41:31 +0200 |
commit | 34619de1b8cb52afa90bbeb3b4fbad34c28f19cf (patch) | |
tree | 1e58b35ab75d393d556f2ee9f1a0e01e763eab83 /drivers/tty/serial/sunsu.c | |
parent | serial: Convert SERIAL_XMIT_SIZE to UART_XMIT_SIZE (diff) | |
download | linux-dev-34619de1b8cb52afa90bbeb3b4fbad34c28f19cf.tar.xz linux-dev-34619de1b8cb52afa90bbeb3b4fbad34c28f19cf.zip |
serial: Consolidate BOTH_EMPTY use
Per file BOTH_EMPTY defines are littering our source code here and
there. Define once in serial.h and create helper for the check
too.
Reviewed-by: Jiri Slaby <jirislaby@kernel.org>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/20220624205424.12686-7-ilpo.jarvinen@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/sunsu.c')
-rw-r--r-- | drivers/tty/serial/sunsu.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/tty/serial/sunsu.c b/drivers/tty/serial/sunsu.c index fff50b5b82eb..84d545e5a8c7 100644 --- a/drivers/tty/serial/sunsu.c +++ b/drivers/tty/serial/sunsu.c @@ -1249,8 +1249,6 @@ static int sunsu_kbd_ms_init(struct uart_sunsu_port *up) #ifdef CONFIG_SERIAL_SUNSU_CONSOLE -#define BOTH_EMPTY (UART_LSR_TEMT | UART_LSR_THRE) - /* * Wait for transmitter & holding register to empty */ @@ -1268,7 +1266,7 @@ static void wait_for_xmitr(struct uart_sunsu_port *up) if (--tmout == 0) break; udelay(1); - } while ((status & BOTH_EMPTY) != BOTH_EMPTY); + } while (!uart_lsr_tx_empty(status)); /* Wait up to 1s for flow control if necessary */ if (up->port.flags & UPF_CONS_FLOW) { |