Commit 8d170472 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Greg Kroah-Hartman

serial: 8250_dma: switch to new dmaengine_terminate_* API

Convert dmaengine_terminate_all() calls to synchronous and asynchronous
versions where appropriate.
Reviewed-by: default avatarPeter Hurley <peter@hurleysoftware.com>
Reviewed-by: default avatarHeikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: default avatarBryan O'Donoghue <pure.logic@nexus-software.ie>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 19d82910
...@@ -142,7 +142,7 @@ void serial8250_rx_dma_flush(struct uart_8250_port *p) ...@@ -142,7 +142,7 @@ void serial8250_rx_dma_flush(struct uart_8250_port *p)
if (dma->rx_running) { if (dma->rx_running) {
dmaengine_pause(dma->rxchan); dmaengine_pause(dma->rxchan);
__dma_rx_complete(p); __dma_rx_complete(p);
dmaengine_terminate_all(dma->rxchan); dmaengine_terminate_async(dma->rxchan);
} }
} }
EXPORT_SYMBOL_GPL(serial8250_rx_dma_flush); EXPORT_SYMBOL_GPL(serial8250_rx_dma_flush);
...@@ -247,14 +247,14 @@ void serial8250_release_dma(struct uart_8250_port *p) ...@@ -247,14 +247,14 @@ void serial8250_release_dma(struct uart_8250_port *p)
return; return;
/* Release RX resources */ /* Release RX resources */
dmaengine_terminate_all(dma->rxchan); dmaengine_terminate_sync(dma->rxchan);
dma_free_coherent(dma->rxchan->device->dev, dma->rx_size, dma->rx_buf, dma_free_coherent(dma->rxchan->device->dev, dma->rx_size, dma->rx_buf,
dma->rx_addr); dma->rx_addr);
dma_release_channel(dma->rxchan); dma_release_channel(dma->rxchan);
dma->rxchan = NULL; dma->rxchan = NULL;
/* Release TX resources */ /* Release TX resources */
dmaengine_terminate_all(dma->txchan); dmaengine_terminate_sync(dma->txchan);
dma_unmap_single(dma->txchan->device->dev, dma->tx_addr, dma_unmap_single(dma->txchan->device->dev, dma->tx_addr,
UART_XMIT_SIZE, DMA_TO_DEVICE); UART_XMIT_SIZE, DMA_TO_DEVICE);
dma_release_channel(dma->txchan); dma_release_channel(dma->txchan);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment