spi: dw-mid: terminate ongoing transfers at exit
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Thu, 18 Sep 2014 17:08:53 +0000 (20:08 +0300)
committerMark Brown <broonie@kernel.org>
Wed, 24 Sep 2014 08:48:53 +0000 (09:48 +0100)
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
drivers/spi/spi-dw-mid.c

index f7f0ad2..ecae30f 100644 (file)
@@ -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);
 }