diff options
author | Ilpo Järvinen | 2023-03-20 15:50:08 +0200 |
---|---|---|
committer | Greg Kroah-Hartman | 2023-03-29 10:53:57 +0200 |
commit | b7313f1d65d668ad0056ca1d93a9017ebb78aeaf (patch) | |
tree | f7bbcc5d4ff5d66cc7df81196b3d0acd29726e9f /drivers/tty | |
parent | 7553574900f37847a25c4d572b13c512811604ed (diff) |
serial: ucc_uart: Use uart_circ_empty()
Use uart_circ_empty() rather than open coding it.
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/20230320135009.47170-1-ilpo.jarvinen@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/serial/ucc_uart.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/tty/serial/ucc_uart.c b/drivers/tty/serial/ucc_uart.c index 676840847962..404230c1ebb2 100644 --- a/drivers/tty/serial/ucc_uart.c +++ b/drivers/tty/serial/ucc_uart.c @@ -366,15 +366,14 @@ static int qe_uart_tx_pump(struct uart_qe_port *qe_port) /* Pick next descriptor and fill from buffer */ bdp = qe_port->tx_cur; - while (!(ioread16be(&bdp->status) & BD_SC_READY) && - (xmit->tail != xmit->head)) { + while (!(ioread16be(&bdp->status) & BD_SC_READY) && !uart_circ_empty(xmit)) { count = 0; p = qe2cpu_addr(be32_to_cpu(bdp->buf), qe_port); while (count < qe_port->tx_fifosize) { *p++ = xmit->buf[xmit->tail]; uart_xmit_advance(port, 1); count++; - if (xmit->head == xmit->tail) + if (uart_circ_empty(xmit)) break; } |