aboutsummaryrefslogtreecommitdiff
path: root/drivers/tty/serial/8250/8250_early.c
diff options
context:
space:
mode:
authorIlpo Järvinen <ilpo.jarvinen@linux.intel.com>2022-06-24 23:54:24 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-06-27 14:41:31 +0200
commit34619de1b8cb52afa90bbeb3b4fbad34c28f19cf (patch)
tree1e58b35ab75d393d556f2ee9f1a0e01e763eab83 /drivers/tty/serial/8250/8250_early.c
parenteb47b59afb7e46c952d7b03884245364990d4910 (diff)
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/8250/8250_early.c')
-rw-r--r--drivers/tty/serial/8250/8250_early.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/tty/serial/8250/8250_early.c b/drivers/tty/serial/8250/8250_early.c
index e52585064565..f271becfc46c 100644
--- a/drivers/tty/serial/8250/8250_early.c
+++ b/drivers/tty/serial/8250/8250_early.c
@@ -84,8 +84,6 @@ static void serial8250_early_out(struct uart_port *port, int offset, int value)
}
}
-#define BOTH_EMPTY (UART_LSR_TEMT | UART_LSR_THRE)
-
static void serial_putc(struct uart_port *port, unsigned char c)
{
unsigned int status;
@@ -94,7 +92,7 @@ static void serial_putc(struct uart_port *port, unsigned char c)
for (;;) {
status = serial8250_early_in(port, UART_LSR);
- if ((status & BOTH_EMPTY) == BOTH_EMPTY)
+ if (uart_lsr_tx_empty(status))
break;
cpu_relax();
}