diff options
author | Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> | 2022-10-19 12:11:44 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-11-03 05:35:43 +0300 |
commit | 5aaae464d6de0913a962d4f9412986a528b0acf7 (patch) | |
tree | 26e7d92e4e80c5b2081be7dd03b259958d782dfc /drivers/tty/serial/sunsab.c | |
parent | 54ffabbe2203817d1d70ceb97407a4382633d2e5 (diff) | |
download | linux-5aaae464d6de0913a962d4f9412986a528b0acf7.tar.xz |
serial: sunsab: Use uart_xmit_advance()
Take advantage of the new uart_xmit_advance() helper.
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/20221019091151.6692-38-ilpo.jarvinen@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/sunsab.c')
-rw-r--r-- | drivers/tty/serial/sunsab.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/tty/serial/sunsab.c b/drivers/tty/serial/sunsab.c index 99608b2a2b74..94db67f21abf 100644 --- a/drivers/tty/serial/sunsab.c +++ b/drivers/tty/serial/sunsab.c @@ -266,8 +266,7 @@ static void transmit_chars(struct uart_sunsab_port *up, for (i = 0; i < up->port.fifosize; i++) { writeb(xmit->buf[xmit->tail], &up->regs->w.xfifo[i]); - xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1); - up->port.icount.tx++; + uart_xmit_advance(&up->port, 1); if (uart_circ_empty(xmit)) break; } @@ -453,8 +452,7 @@ static void sunsab_start_tx(struct uart_port *port) for (i = 0; i < up->port.fifosize; i++) { writeb(xmit->buf[xmit->tail], &up->regs->w.xfifo[i]); - xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1); - up->port.icount.tx++; + uart_xmit_advance(&up->port, 1); if (uart_circ_empty(xmit)) break; } |