[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20221019091151.6692-38-ilpo.jarvinen@linux.intel.com>
Date: Wed, 19 Oct 2022 12:11:44 +0300
From: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
To: linux-serial@...r.kernel.org, Greg KH <gregkh@...uxfoundation.org>,
Jiri Slaby <jirislaby@...nel.org>,
"David S. Miller" <davem@...emloft.net>,
sparclinux@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
Subject: [PATCH 37/44] serial: sunsab: Use uart_xmit_advance()
Take advantage of the new uart_xmit_advance() helper.
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
---
drivers/tty/serial/sunsab.c | 6 ++----
1 file 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;
}
--
2.30.2
Powered by blists - more mailing lists