diff options
author | Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> | 2022-10-19 11:11:10 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-11-03 03:35:41 +0100 |
commit | 1fcff75f3932bdc5ef923bbe8e973d1f3ed59096 (patch) | |
tree | e1729c5b770eab3088c282746ec61adf6fed1b95 /drivers/tty/serial/msm_serial.c | |
parent | serial: men_z135_uart: Use uart_xmit_advance() (diff) | |
download | linux-1fcff75f3932bdc5ef923bbe8e973d1f3ed59096.tar.xz linux-1fcff75f3932bdc5ef923bbe8e973d1f3ed59096.zip |
serial: msm: Use uart_xmit_advance()
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-4-ilpo.jarvinen@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/msm_serial.c')
-rw-r--r-- | drivers/tty/serial/msm_serial.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/tty/serial/msm_serial.c b/drivers/tty/serial/msm_serial.c index 7dd19a281579..2b2e0f74b75a 100644 --- a/drivers/tty/serial/msm_serial.c +++ b/drivers/tty/serial/msm_serial.c @@ -464,12 +464,9 @@ static void msm_complete_tx_dma(void *args) } count = dma->count - state.residue; - port->icount.tx += count; + uart_xmit_advance(port, count); dma->count = 0; - xmit->tail += count; - xmit->tail &= UART_XMIT_SIZE - 1; - /* Restore "Tx FIFO below watermark" interrupt */ msm_port->imr |= MSM_UART_IMR_TXLEV; msm_write(port, msm_port->imr, MSM_UART_IMR); @@ -866,13 +863,11 @@ static void msm_handle_tx_pio(struct uart_port *port, unsigned int tx_count) else num_chars = 1; - for (i = 0; i < num_chars; i++) { + for (i = 0; i < num_chars; i++) buf[i] = xmit->buf[xmit->tail + i]; - port->icount.tx++; - } iowrite32_rep(tf, buf, 1); - xmit->tail = (xmit->tail + num_chars) & (UART_XMIT_SIZE - 1); + uart_xmit_advance(port, num_chars); tf_pointer += num_chars; } |