]> git.itanic.dy.fi Git - linux-stable/commitdiff
dmaengine: at_xdmac: fix to pass correct device identity to free_irq()
authorWei Yongjun <weiyj.lk@gmail.com>
Wed, 10 Aug 2016 03:17:09 +0000 (03:17 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 7 Oct 2016 13:21:26 +0000 (15:21 +0200)
commit 6a8b0c6b18f62a277ffb2139d0c0253fe35d7feb upstream.

free_irq() expects the same device identity that was passed to
corresponding request_irq(), otherwise the IRQ is not freed.

Fixes: e1f7c9eee707 ("dmaengine: at_xdmac: creation of the atmel eXtended DMA Controller driver")
Signed-off-by: Wei Yongjun <weiyj.lk@gmail.com>
Acked-by: Ludovic Desroches <ludovic.desroches@atmel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/dma/at_xdmac.c

index ee67ee103478a9683e166e965131f56fafb187db..de9a3d7505a460c658edfc5730b46bda2c9fa54a 100644 (file)
@@ -2067,7 +2067,7 @@ static int at_xdmac_probe(struct platform_device *pdev)
 err_clk_disable:
        clk_disable_unprepare(atxdmac->clk);
 err_free_irq:
-       free_irq(atxdmac->irq, atxdmac->dma.dev);
+       free_irq(atxdmac->irq, atxdmac);
        return ret;
 }
 
@@ -2081,7 +2081,7 @@ static int at_xdmac_remove(struct platform_device *pdev)
        dma_async_device_unregister(&atxdmac->dma);
        clk_disable_unprepare(atxdmac->clk);
 
-       free_irq(atxdmac->irq, atxdmac->dma.dev);
+       free_irq(atxdmac->irq, atxdmac);
 
        for (i = 0; i < atxdmac->dma.chancnt; i++) {
                struct at_xdmac_chan *atchan = &atxdmac->chan[i];