Skip to content

Commit

Permalink
spi: dw-mid: terminate ongoing transfers at exit
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Andy Shevchenko authored and Mark Brown committed Sep 24, 2014
1 parent b41583e commit 8e45ef6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/spi/spi-dw-mid.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 8e45ef6

Please sign in to comment.