From: Lars-Peter Clausen Date: Sat, 21 Nov 2015 11:09:47 +0000 (+0100) Subject: dmaengine: at_xdmac: Remove unnecessary synchronize_irq() before free_irq() X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=1f281792f649fc40054fc9146d8aa6b8b3c2aaff;p=openwrt%2Fstaging%2Fblogic.git dmaengine: at_xdmac: Remove unnecessary synchronize_irq() before free_irq() Calling synchronize_irq() right before free_irq() is quite useless. On one hand the IRQ can easily fire again before free_irq() is entered, on the other hand free_irq() itself calls synchronize_irq() internally (in a race condition free way), before any state associated with the IRQ is freed. Patch was generated using the following semantic patch: // @@ expression irq; @@ -synchronize_irq(irq); free_irq(irq, ...); // Signed-off-by: Lars-Peter Clausen Acked-by: Ludovic Desroches Signed-off-by: Vinod Koul --- diff --git a/drivers/dma/at_xdmac.c b/drivers/dma/at_xdmac.c index f2b6e7d22765..d0ae4613b87e 100644 --- a/drivers/dma/at_xdmac.c +++ b/drivers/dma/at_xdmac.c @@ -2007,8 +2007,6 @@ static int at_xdmac_remove(struct platform_device *pdev) dma_async_device_unregister(&atxdmac->dma); clk_disable_unprepare(atxdmac->clk); - synchronize_irq(atxdmac->irq); - free_irq(atxdmac->irq, atxdmac->dma.dev); for (i = 0; i < atxdmac->dma.chancnt; i++) {