diff options
author | Vignesh Raman <Vignesh_Raman@mentor.com> | 2014-08-05 18:39:42 +0530 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2014-08-19 20:52:05 +0530 |
commit | c12fe49726cfebacb47dca5f2bb544c38aa09e6d (patch) | |
tree | fb0b558657212091b31c218d2f482eb33242146a /drivers/dma | |
parent | 23e11811378259831777e8fdc8b9836faeaa72cd (diff) | |
download | op-kernel-dev-c12fe49726cfebacb47dca5f2bb544c38aa09e6d.zip op-kernel-dev-c12fe49726cfebacb47dca5f2bb544c38aa09e6d.tar.gz |
dma: imx-sdma: Adding tasklet_kill() in sdma_remove function.
Several dma drivers calls tasklet_kill() in remove function. This is done
because all running tasklets should be killed on remove. This is missing
in imx sdma driver, so adding tasklet_kill() in sdma_remove function.
Signed-off-by: Vignesh Raman <Vignesh_Raman@mentor.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma')
-rw-r--r-- | drivers/dma/imx-sdma.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c index 40e65a4..c615e88 100644 --- a/drivers/dma/imx-sdma.c +++ b/drivers/dma/imx-sdma.c @@ -1645,12 +1645,19 @@ static int sdma_remove(struct platform_device *pdev) struct sdma_engine *sdma = platform_get_drvdata(pdev); struct resource *iores = platform_get_resource(pdev, IORESOURCE_MEM, 0); int irq = platform_get_irq(pdev, 0); + int i; dma_async_device_unregister(&sdma->dma_device); kfree(sdma->script_addrs); free_irq(irq, sdma); iounmap(sdma->regs); release_mem_region(iores->start, resource_size(iores)); + /* Kill the tasklet */ + for (i = 0; i < MAX_DMA_CHANNELS; i++) { + struct sdma_channel *sdmac = &sdma->channel[i]; + + tasklet_kill(&sdmac->tasklet); + } kfree(sdma); platform_set_drvdata(pdev, NULL); |