diff options
author | Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> | 2022-10-19 12:11:18 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-11-03 03:35:41 +0100 |
commit | add147a4591e20732c3f51ed63414d9e89757e5f (patch) | |
tree | 733a730cbe5713b29437ac4e9c324ade854b55bd | |
parent | 8a8dee2cdbb3d147430684d408127e5c9e910fc0 (diff) | |
download | linux-add147a4591e20732c3f51ed63414d9e89757e5f.tar.gz linux-add147a4591e20732c3f51ed63414d9e89757e5f.tar.bz2 linux-add147a4591e20732c3f51ed63414d9e89757e5f.zip |
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>
-rw-r--r-- | drivers/tty/serial/atmel_serial.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c index a6b4d30c5888..4ca04676c406 100644 --- a/drivers/tty/serial/atmel_serial.c +++ b/drivers/tty/serial/atmel_serial.c @@ -859,10 +859,7 @@ static void atmel_complete_tx_dma(void *arg) if (chan) dmaengine_terminate_all(chan); - xmit->tail += atmel_port->tx_len; - xmit->tail &= UART_XMIT_SIZE - 1; - - port->icount.tx += atmel_port->tx_len; + uart_xmit_advance(port, atmel_port->tx_len); spin_lock_irq(&atmel_port->lock_tx); async_tx_ack(atmel_port->desc_tx); @@ -1455,11 +1452,7 @@ static void atmel_tx_pdc(struct uart_port *port) /* nothing left to transmit? */ if (atmel_uart_readl(port, ATMEL_PDC_TCR)) return; - - xmit->tail += pdc->ofs; - xmit->tail &= UART_XMIT_SIZE - 1; - - port->icount.tx += pdc->ofs; + uart_xmit_advance(port, pdc->ofs); pdc->ofs = 0; /* more to transmit - setup next transfer */ |