summaryrefslogtreecommitdiff
path: root/drivers/spi/spi-dw-mid.c
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2014-09-18 21:08:53 +0400
committerMark Brown <broonie@kernel.org>2014-09-24 12:48:53 +0400
commit8e45ef682cb31fda62ed4eeede5d9745a0a1b1e2 (patch)
tree46f2d17cdb84b9ca3f09a1172d0c7113cee50613 /drivers/spi/spi-dw-mid.c
parentb41583e7299046abdc578c33f25ed83ee95b9b31 (diff)
downloadlinux-8e45ef682cb31fda62ed4eeede5d9745a0a1b1e2.tar.xz
spi: dw-mid: terminate ongoing transfers at exit
Do full clean up at exit, means terminate all ongoing DMA transfers. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Mark Brown <broonie@kernel.org> Cc: stable@vger.kernel.org
Diffstat (limited to 'drivers/spi/spi-dw-mid.c')
-rw-r--r--drivers/spi/spi-dw-mid.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/spi/spi-dw-mid.c b/drivers/spi/spi-dw-mid.c
index f7f0ad285ae6..ecae30fe28af 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);
}