Commit e5e89602 authored by Fabien Lahoudere's avatar Fabien Lahoudere Committed by Greg Kroah-Hartman

serial: imx: Replace dmaengine old API

dmaengine_terminate_all() is deprecated and should be replaced by
dmaengine_terminate_sync() in non-atomic context or dmaengine_terminate_async()
with dmaengine_synchronize().

See commit b36f09c3 ("dmaengine: Add transfer termination synchronization support")
Signed-off-by: default avatarFabien Lahoudere <fabien.lahoudere@collabora.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a5a2b130
...@@ -1122,7 +1122,7 @@ static void imx_setup_ufcr(struct imx_port *sport, ...@@ -1122,7 +1122,7 @@ static void imx_setup_ufcr(struct imx_port *sport,
static void imx_uart_dma_exit(struct imx_port *sport) static void imx_uart_dma_exit(struct imx_port *sport)
{ {
if (sport->dma_chan_rx) { if (sport->dma_chan_rx) {
dmaengine_terminate_all(sport->dma_chan_rx); dmaengine_terminate_sync(sport->dma_chan_rx);
dma_release_channel(sport->dma_chan_rx); dma_release_channel(sport->dma_chan_rx);
sport->dma_chan_rx = NULL; sport->dma_chan_rx = NULL;
sport->rx_cookie = -EINVAL; sport->rx_cookie = -EINVAL;
...@@ -1131,7 +1131,7 @@ static void imx_uart_dma_exit(struct imx_port *sport) ...@@ -1131,7 +1131,7 @@ static void imx_uart_dma_exit(struct imx_port *sport)
} }
if (sport->dma_chan_tx) { if (sport->dma_chan_tx) {
dmaengine_terminate_all(sport->dma_chan_tx); dmaengine_terminate_sync(sport->dma_chan_tx);
dma_release_channel(sport->dma_chan_tx); dma_release_channel(sport->dma_chan_tx);
sport->dma_chan_tx = NULL; sport->dma_chan_tx = NULL;
} }
...@@ -1351,8 +1351,8 @@ static void imx_shutdown(struct uart_port *port) ...@@ -1351,8 +1351,8 @@ static void imx_shutdown(struct uart_port *port)
if (sport->dma_is_enabled) { if (sport->dma_is_enabled) {
sport->dma_is_rxing = 0; sport->dma_is_rxing = 0;
sport->dma_is_txing = 0; sport->dma_is_txing = 0;
dmaengine_terminate_all(sport->dma_chan_tx); dmaengine_terminate_sync(sport->dma_chan_tx);
dmaengine_terminate_all(sport->dma_chan_rx); dmaengine_terminate_sync(sport->dma_chan_rx);
spin_lock_irqsave(&sport->port.lock, flags); spin_lock_irqsave(&sport->port.lock, flags);
imx_stop_tx(port); imx_stop_tx(port);
......
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