[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1407244182-27302-3-git-send-email-Vignesh_Raman@mentor.com>
Date: Tue, 5 Aug 2014 18:39:42 +0530
From: Vignesh Raman <Vignesh_Raman@...tor.com>
To: <vinod.koul@...el.com>, <dan.j.williams@...el.com>,
<dmaengine@...r.kernel.org>, <linux-kernel@...r.kernel.org>
CC: <Jiada_Wang@...tor.com>
Subject: [PATCH v2 2/2] 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@...tor.com>
---
drivers/dma/imx-sdma.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c
index 5cefc7d..3961c72 100644
--- a/drivers/dma/imx-sdma.c
+++ b/drivers/dma/imx-sdma.c
@@ -1638,12 +1638,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);
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists