Skip to contentSkip to conversation

dmaengine: at_xdmac: fix to pass correct device identity to free_irq()

PATCH New Wei Yongjun 3 participants 3 messages Aug 10, 2016 – Aug 22, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dmaengine: at_xdmac: fix to pass correct device identity to free_irq()

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")

---
 drivers/dma/at_xdmac.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/dma/at_xdmac.c +2 -2
index 2badc57..b7d7f2d 100644
@@ -2067,7 +2067,7 @@ err_dma_unregister:
 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];
#1 lore raw

PATCH 1/1 dmaengine: at_xdmac: fix to pass correct device identity to free_irq()

Quoted 6 lines · Wei Yongjun

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")

Thanks

Quoted 27 lines
---
 drivers/dma/at_xdmac.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/dma/at_xdmac.c +2 -2
index 2badc57..b7d7f2d 100644
@@ -2067,7 +2067,7 @@ err_dma_unregister:
 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];
Applied
#2 lore raw

PATCH 1/1 dmaengine: at_xdmac: fix to pass correct device identity to free_irq()

In reply to Wei Yongjun
Quoted 2 lines · Wei Yongjun

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

Applied, thanks

Signature · 1 line
~Vinod