浏览代码

dmaengine: pl330: explicitly freeup irq

dmaengine device should explicitly call devm_free_irq() when using
devm_request_irq().

The irq is still ON when devices remove is executed and irq should be
quiesced before remove is completed.

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Cc: Jassi Brar <jassisinghbrar@gmail.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Vinod Koul 9 年之前
父节点
当前提交
46cf94d6ab
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6 0
      drivers/dma/pl330.c

+ 6 - 0
drivers/dma/pl330.c

@@ -3002,12 +3002,18 @@ static int pl330_remove(struct amba_device *adev)
 {
 {
 	struct pl330_dmac *pl330 = amba_get_drvdata(adev);
 	struct pl330_dmac *pl330 = amba_get_drvdata(adev);
 	struct dma_pl330_chan *pch, *_p;
 	struct dma_pl330_chan *pch, *_p;
+	int i, irq;
 
 
 	pm_runtime_get_noresume(pl330->ddma.dev);
 	pm_runtime_get_noresume(pl330->ddma.dev);
 
 
 	if (adev->dev.of_node)
 	if (adev->dev.of_node)
 		of_dma_controller_free(adev->dev.of_node);
 		of_dma_controller_free(adev->dev.of_node);
 
 
+	for (i = 0; i < AMBA_NR_IRQS; i++) {
+		irq = adev->irq[i];
+		devm_free_irq(&adev->dev, irq, pl330);
+	}
+
 	dma_async_device_unregister(&pl330->ddma);
 	dma_async_device_unregister(&pl330->ddma);
 
 
 	/* Idle the DMAC */
 	/* Idle the DMAC */