Message ID | 1406725875-9171-3-git-send-email-Vignesh_Raman@mentor.com (mailing list archive) |
---|---|
State | Rejected |
Delegated to: | Vinod Koul |
Headers | show |
On Wed, Jul 30, 2014 at 06:41:15PM +0530, Vignesh Raman wrote: > Several dma drivers calls tasklet_kill() in remove function. This is missing in > imx driver, so adding tasklet_kill() in sdma_remove function. And why should we do that ?
On Thursday 31 July 2014 05:32 PM, Vinod Koul wrote: > On Wed, Jul 30, 2014 at 06:41:15PM +0530, Vignesh Raman wrote: >> Several dma drivers calls tasklet_kill() in remove function. This is missing in >> imx driver, so adding tasklet_kill() in sdma_remove function. > And why should we do that ? > This is done because all running tasklets should be killed on remove. Regards, Vignesh. -- To unsubscribe from this list: send the line "unsubscribe dmaengine" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Fri, Aug 01, 2014 at 07:36:53PM +0530, Vignesh Raman wrote: > On Thursday 31 July 2014 05:32 PM, Vinod Koul wrote: > > On Wed, Jul 30, 2014 at 06:41:15PM +0530, Vignesh Raman wrote: > >> Several dma drivers calls tasklet_kill() in remove function. This is missing in > >> imx driver, so adding tasklet_kill() in sdma_remove function. > > And why should we do that ? > > > This is done because all running tasklets should be killed on remove. And what prevents is from mentioning this in changelog!
On Friday 01 August 2014 10:15 PM, Vinod Koul wrote: > On Fri, Aug 01, 2014 at 07:36:53PM +0530, Vignesh Raman wrote: >> On Thursday 31 July 2014 05:32 PM, Vinod Koul wrote: >>> On Wed, Jul 30, 2014 at 06:41:15PM +0530, Vignesh Raman wrote: >>>> Several dma drivers calls tasklet_kill() in remove function. This is missing in >>>> imx driver, so adding tasklet_kill() in sdma_remove function. >>> And why should we do that ? >>> >> This is done because all running tasklets should be killed on remove. > > And what prevents is from mentioning this in changelog! > I should have mentioned in the Changelog but missed it, sorry about that. I will add it and send updated version. Regards, Vignesh. -- To unsubscribe from this list: send the line "unsubscribe dmaengine" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c index 1360b9d..974337f 100644 --- a/drivers/dma/imx-sdma.c +++ b/drivers/dma/imx-sdma.c @@ -1636,12 +1636,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);
Several dma drivers calls tasklet_kill() in remove function. This is missing in imx driver, so adding tasklet_kill() in sdma_remove function. Signed-off-by: Vignesh Raman <Vignesh_Raman@mentor.com> --- drivers/dma/imx-sdma.c | 7 +++++++ 1 file changed, 7 insertions(+)