aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma
diff options
context:
space:
mode:
authorVignesh Raman <Vignesh_Raman@mentor.com>2014-08-05 09:09:42 -0400
committerVinod Koul <vinod.koul@intel.com>2014-08-19 11:22:05 -0400
commitc12fe49726cfebacb47dca5f2bb544c38aa09e6d (patch)
treefb0b558657212091b31c218d2f482eb33242146a /drivers/dma
parent23e11811378259831777e8fdc8b9836faeaa72cd (diff)
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.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c
index 40e65a4df94d..c615e88c118a 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)
1645 struct sdma_engine *sdma = platform_get_drvdata(pdev); 1645 struct sdma_engine *sdma = platform_get_drvdata(pdev);
1646 struct resource *iores = platform_get_resource(pdev, IORESOURCE_MEM, 0); 1646 struct resource *iores = platform_get_resource(pdev, IORESOURCE_MEM, 0);
1647 int irq = platform_get_irq(pdev, 0); 1647 int irq = platform_get_irq(pdev, 0);
1648 int i;
1648 1649
1649 dma_async_device_unregister(&sdma->dma_device); 1650 dma_async_device_unregister(&sdma->dma_device);
1650 kfree(sdma->script_addrs); 1651 kfree(sdma->script_addrs);
1651 free_irq(irq, sdma); 1652 free_irq(irq, sdma);
1652 iounmap(sdma->regs); 1653 iounmap(sdma->regs);
1653 release_mem_region(iores->start, resource_size(iores)); 1654 release_mem_region(iores->start, resource_size(iores));
1655 /* Kill the tasklet */
1656 for (i = 0; i < MAX_DMA_CHANNELS; i++) {
1657 struct sdma_channel *sdmac = &sdma->channel[i];
1658
1659 tasklet_kill(&sdmac->tasklet);
1660 }
1654 kfree(sdma); 1661 kfree(sdma);
1655 1662
1656 platform_set_drvdata(pdev, NULL); 1663 platform_set_drvdata(pdev, NULL);