From: Vinod Koul Date: Tue, 5 Jul 2016 04:28:33 +0000 (+0530) Subject: dmaengine: omap-dma: explicitly freeup irq X-Git-Tag: v4.8-rc1~117^2^2~15 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=898dbbf65f1d041d5c1b29a0880286e26fac5076;p=users%2Fjedix%2Flinux-maple.git dmaengine: omap-dma: 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 Acked-by: Peter Ujfalusi --- diff --git a/drivers/dma/omap-dma.c b/drivers/dma/omap-dma.c index 1e984e18c1266..5ff52998172a3 100644 --- a/drivers/dma/omap-dma.c +++ b/drivers/dma/omap-dma.c @@ -1204,10 +1204,14 @@ static int omap_dma_probe(struct platform_device *pdev) static int omap_dma_remove(struct platform_device *pdev) { struct omap_dmadev *od = platform_get_drvdata(pdev); + int irq; if (pdev->dev.of_node) of_dma_controller_free(pdev->dev.of_node); + irq = platform_get_irq(pdev, 1); + devm_free_irq(&pdev->dev, irq, od); + dma_async_device_unregister(&od->ddev); if (!od->legacy) {