serial: digicolor: Use uart_xmit_advance()
authorIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Wed, 19 Oct 2022 09:11:21 +0000 (12:11 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 Nov 2022 02:35:41 +0000 (03:35 +0100)
Take advantage of the new uart_xmit_advance() helper.

Acked-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/20221019091151.6692-15-ilpo.jarvinen@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/digicolor-usart.c

index 0c0a62346f23195b546f7707f8fab518ba2cb51d..ed197705f7eea028ef1f18ba276b9ed399f048f9 100644 (file)
@@ -202,8 +202,7 @@ static void digicolor_uart_tx(struct uart_port *port)
 
        while (!uart_circ_empty(xmit)) {
                writeb(xmit->buf[xmit->tail], port->membase + UA_EMI_REC);
-               xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1);
-               port->icount.tx++;
+               uart_xmit_advance(port, 1);
 
                if (digicolor_uart_tx_full(port))
                        break;