Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

serial: atmel: Use uart_xmit_advance()

Take advantage of the new uart_xmit_advance() helper.

Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Acked-By: Richard GENOUD <richard.genoud@gmail.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/20221019091151.6692-12-ilpo.jarvinen@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Ilpo Järvinen and committed by
Greg Kroah-Hartman
add147a4 8a8dee2c

+2 -9
+2 -9
drivers/tty/serial/atmel_serial.c
··· 859 859 860 860 if (chan) 861 861 dmaengine_terminate_all(chan); 862 - xmit->tail += atmel_port->tx_len; 863 - xmit->tail &= UART_XMIT_SIZE - 1; 864 - 865 - port->icount.tx += atmel_port->tx_len; 862 + uart_xmit_advance(port, atmel_port->tx_len); 866 863 867 864 spin_lock_irq(&atmel_port->lock_tx); 868 865 async_tx_ack(atmel_port->desc_tx); ··· 1452 1455 /* nothing left to transmit? */ 1453 1456 if (atmel_uart_readl(port, ATMEL_PDC_TCR)) 1454 1457 return; 1455 - 1456 - xmit->tail += pdc->ofs; 1457 - xmit->tail &= UART_XMIT_SIZE - 1; 1458 - 1459 - port->icount.tx += pdc->ofs; 1458 + uart_xmit_advance(port, pdc->ofs); 1460 1459 pdc->ofs = 0; 1461 1460 1462 1461 /* more to transmit - setup next transfer */