diff mbox

[22/32] dmaengine: omap-dma: explicitly freeup irq

Message ID 1467730478-9696-23-git-send-email-vinod.koul@intel.com (mailing list archive)
State Accepted
Headers show

Commit Message

Vinod Koul July 5, 2016, 2:54 p.m. UTC
dmaengine device should explicitly call devm_free_irq() when using
devm_reqister_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>
Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
---
 drivers/dma/omap-dma.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Peter Ujfalusi July 5, 2016, 7:59 p.m. UTC | #1
On 07/05/2016 05:54 PM, Vinod Koul wrote:
> dmaengine device should explicitly call devm_free_irq() when using
> devm_reqister_irq().
> 
> The irq is still ON when devices remove is executed and irq should be
> quiesced before remove is completed.

Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>

> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
> Cc: Peter Ujfalusi <peter.ujfalusi@ti.com>
> ---
>  drivers/dma/omap-dma.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/dma/omap-dma.c b/drivers/dma/omap-dma.c
> index 1e984e18c126..5ff52998172a 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) {
>
diff mbox

Patch

diff --git a/drivers/dma/omap-dma.c b/drivers/dma/omap-dma.c
index 1e984e18c126..5ff52998172a 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) {