]> git.karo-electronics.de Git - linux-beck.git/commitdiff
dmaengine: omap-dma: explicitly freeup irq
authorVinod Koul <vinod.koul@intel.com>
Tue, 5 Jul 2016 04:28:33 +0000 (09:58 +0530)
committerVinod Koul <vinod.koul@intel.com>
Sat, 16 Jul 2016 14:49:05 +0000 (20:19 +0530)
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>
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
drivers/dma/omap-dma.c

index 1e984e18c1266b74fc01c247fad36f3e132ad587..5ff52998172a30d1e651c805279d0eaa97a593e2 100644 (file)
@@ -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) {