Skip to content

Commit 8682ab0

Browse files
SherrySun5gregkh
authored andcommitted
tty: serial: fsl_lpuart: switch to new dmaengine_terminate_* API
Convert dmaengine_terminate_all() calls to synchronous and asynchronous versions where appropriate. Signed-off-by: Sherry Sun <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 1a6ec67 commit 8682ab0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/tty/serial/fsl_lpuart.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ static void lpuart_flush_buffer(struct uart_port *port)
583583
sport->dma_tx_nents, DMA_TO_DEVICE);
584584
sport->dma_tx_in_progress = false;
585585
}
586-
dmaengine_terminate_all(chan);
586+
dmaengine_terminate_async(chan);
587587
}
588588

589589
if (lpuart_is_32(sport)) {
@@ -1327,7 +1327,7 @@ static void lpuart_dma_rx_free(struct uart_port *port)
13271327
struct lpuart_port, port);
13281328
struct dma_chan *chan = sport->dma_rx_chan;
13291329

1330-
dmaengine_terminate_all(chan);
1330+
dmaengine_terminate_sync(chan);
13311331
dma_unmap_sg(chan->device->dev, &sport->rx_sgl, 1, DMA_FROM_DEVICE);
13321332
kfree(sport->rx_ring.buf);
13331333
sport->rx_ring.tail = 0;
@@ -1757,7 +1757,7 @@ static void lpuart_dma_shutdown(struct lpuart_port *sport)
17571757
if (wait_event_interruptible_timeout(sport->dma_wait,
17581758
!sport->dma_tx_in_progress, msecs_to_jiffies(300)) <= 0) {
17591759
sport->dma_tx_in_progress = false;
1760-
dmaengine_terminate_all(sport->dma_tx_chan);
1760+
dmaengine_terminate_sync(sport->dma_tx_chan);
17611761
}
17621762
sport->lpuart_dma_tx_use = false;
17631763
}
@@ -2968,7 +2968,7 @@ static int lpuart_suspend(struct device *dev)
29682968
}
29692969
spin_unlock_irqrestore(&sport->port.lock, flags);
29702970
sport->dma_tx_in_progress = false;
2971-
dmaengine_terminate_all(sport->dma_tx_chan);
2971+
dmaengine_terminate_sync(sport->dma_tx_chan);
29722972
}
29732973
} else if (pm_runtime_active(sport->port.dev)) {
29742974
lpuart_disable_clks(sport);

0 commit comments

Comments
 (0)