serial: max3100: Use uart_xmit_advance()
authorIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Wed, 19 Oct 2022 09:11:27 +0000 (12:11 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 Nov 2022 02:35:42 +0000 (03:35 +0100)
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-21-ilpo.jarvinen@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/max3100.c

index c69602f356fdc81aff6c5c65fcea514f2c1c7a1c..bb74f23251fe43973a77409dddf1c949178272ed 100644 (file)
@@ -292,9 +292,7 @@ static void max3100_work(struct work_struct *w)
                        } else if (!uart_circ_empty(xmit) &&
                                   !uart_tx_stopped(&s->port)) {
                                tx = xmit->buf[xmit->tail];
-                               xmit->tail = (xmit->tail + 1) &
-                                       (UART_XMIT_SIZE - 1);
-                               s->port.icount.tx++;
+                               uart_xmit_advance(&s->port, 1);
                        }
                        if (tx != 0xffff) {
                                max3100_calc_parity(s, &tx);