Commit 3308bca6 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Greg Kroah-Hartman

spi: dw-mid: terminate ongoing transfers at exit

commit 8e45ef68 upstream.

Do full clean up at exit, means terminate all ongoing DMA transfers.
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 19a2d4e8
...@@ -91,7 +91,11 @@ static void mid_spi_dma_exit(struct dw_spi *dws) ...@@ -91,7 +91,11 @@ static void mid_spi_dma_exit(struct dw_spi *dws)
{ {
if (!dws->dma_inited) if (!dws->dma_inited)
return; return;
dmaengine_terminate_all(dws->txchan);
dma_release_channel(dws->txchan); dma_release_channel(dws->txchan);
dmaengine_terminate_all(dws->rxchan);
dma_release_channel(dws->rxchan); dma_release_channel(dws->rxchan);
} }
......
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