提交 f4e0628b 编写于 作者: V Vinod Koul

dmaengine: edma: kill the tasklets upon exit

drivers should ensure that tasklets are killed, so that they can't be
executed after driver remove is executed, so ensure they are killed.

This driver used vchan tasklets, so those need to be killed.
Signed-off-by: NVinod Koul <vinod.koul@intel.com>
Acked-by: NPeter Ujfalusi <peter.ujfalusi@ti.com>
上级 638001e0
......@@ -2393,6 +2393,17 @@ static int edma_probe(struct platform_device *pdev)
return ret;
}
static void edma_cleanupp_vchan(struct dma_device *dmadev)
{
struct edma_chan *echan, *_echan;
list_for_each_entry_safe(echan, _echan,
&dmadev->channels, vchan.chan.device_node) {
list_del(&echan->vchan.chan.device_node);
tasklet_kill(&echan->vchan.task);
}
}
static int edma_remove(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
......@@ -2401,6 +2412,8 @@ static int edma_remove(struct platform_device *pdev)
devm_free_irq(dev, ecc->ccint, ecc);
devm_free_irq(dev, ecc->ccerrint, ecc);
edma_cleanupp_vchan(&ecc->dma_slave);
if (dev->of_node)
of_dma_controller_free(dev->of_node);
dma_async_device_unregister(&ecc->dma_slave);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册