aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Shevchenko2014-11-06 13:28:16 +0200
committerGreg Kroah-Hartman2014-11-06 15:01:03 -0800
commit2dc98946d4d4398ab07d569c414c1f839907ea0b (patch)
treec9275f988b14f82025cfbca648b1ebd842b95afa
parentbd737f8738b7e15930aa7b47c94c28a8d83148ac (diff)
serial: 8250_dma: call serial8250_tx_dma unconditionally
Since we have the same check inside the function we may drop it away in __dma_tx_complete(). Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/tty/serial/8250/8250_dma.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/drivers/tty/serial/8250/8250_dma.c b/drivers/tty/serial/8250/8250_dma.c
index 258430b72039..b16f9b169202 100644
--- a/drivers/tty/serial/8250/8250_dma.c
+++ b/drivers/tty/serial/8250/8250_dma.c
@@ -21,6 +21,7 @@ static void __dma_tx_complete(void *param)
struct uart_8250_dma *dma = p->dma;
struct circ_buf *xmit = &p->port.state->xmit;
unsigned long flags;
+ int ret;
dma_sync_single_for_cpu(dma->txchan->device->dev, dma->tx_addr,
UART_XMIT_SIZE, DMA_TO_DEVICE);
@@ -36,15 +37,11 @@ static void __dma_tx_complete(void *param)
if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS)
uart_write_wakeup(&p->port);
- if (!uart_circ_empty(xmit) && !uart_tx_stopped(&p->port)) {
- int ret;
-
- ret = serial8250_tx_dma(p);
- if (ret) {
- dma->tx_err = 1;
- p->ier |= UART_IER_THRI;
- serial_port_out(&p->port, UART_IER, p->ier);
- }
+ ret = serial8250_tx_dma(p);
+ if (ret) {
+ dma->tx_err = 1;
+ p->ier |= UART_IER_THRI;
+ serial_port_out(&p->port, UART_IER, p->ier);
}
spin_unlock_irqrestore(&p->port.lock, flags);