diff mbox

[03/10] spi: dw-mid: terminate ongoing transfers at exit

Message ID 1411060140-2801-4-git-send-email-andriy.shevchenko@linux.intel.com (mailing list archive)
State Accepted
Commit 8e45ef682cb31fda62ed4eeede5d9745a0a1b1e2
Headers show

Commit Message

Andy Shevchenko Sept. 18, 2014, 5:08 p.m. UTC
Do full clean up at exit, means terminate all ongoing DMA transfers.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/spi/spi-dw-mid.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Mark Brown Sept. 24, 2014, 8:49 a.m. UTC | #1
On Thu, Sep 18, 2014 at 08:08:53PM +0300, Andy Shevchenko wrote:
> Do full clean up at exit, means terminate all ongoing DMA transfers.

Applied, thanks.
diff mbox

Patch

diff --git a/drivers/spi/spi-dw-mid.c b/drivers/spi/spi-dw-mid.c
index 97156e4..27150c7 100644
--- a/drivers/spi/spi-dw-mid.c
+++ b/drivers/spi/spi-dw-mid.c
@@ -89,7 +89,11 @@  static void mid_spi_dma_exit(struct dw_spi *dws)
 {
 	if (!dws->dma_inited)
 		return;
+
+	dmaengine_terminate_all(dws->txchan);
 	dma_release_channel(dws->txchan);
+
+	dmaengine_terminate_all(dws->rxchan);
 	dma_release_channel(dws->rxchan);
 }