aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2022-09-09 12:11:02 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-09-25 09:27:41 +0200
commite02fbb0bcb9b6d5f83f01af87bc643dd0d78319b (patch)
tree7ee4d16a0f1ef253ea5fee3f111b901884165159 /drivers/tty
parentserial: 8250_omap: Convert to use uart_xmit_advance() (diff)
downloadlinux-dev-e02fbb0bcb9b6d5f83f01af87bc643dd0d78319b.tar.xz
linux-dev-e02fbb0bcb9b6d5f83f01af87bc643dd0d78319b.zip
serial: 8250_dma: Convert to use uart_xmit_advance()
uart_xmit_advance() provides a common way on how to advance the Tx queue. Use it for the sake of unification and robustness. Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20220909091102.58941-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/8250/8250_dma.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/tty/serial/8250/8250_dma.c b/drivers/tty/serial/8250/8250_dma.c
index d99020fd3427..b85c82616e8c 100644
--- a/drivers/tty/serial/8250/8250_dma.c
+++ b/drivers/tty/serial/8250/8250_dma.c
@@ -26,9 +26,7 @@ static void __dma_tx_complete(void *param)
dma->tx_running = 0;
- xmit->tail += dma->tx_size;
- xmit->tail &= UART_XMIT_SIZE - 1;
- p->port.icount.tx += dma->tx_size;
+ uart_xmit_advance(&p->port, dma->tx_size);
if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS)
uart_write_wakeup(&p->port);