Commit d509a83c authored by Alex Smith's avatar Alex Smith Committed by Vinod Koul

dmaengine: jz4780: Don't use devm_*_irq() functions

We must explicitly free the IRQ before the device is unregistered in
case any device interrupt still occurs, so there's no point in using
the managed variations of the IRQ functions. Change to the regular
versions.
Signed-off-by: default avatarAlex Smith <alex.smith@imgtec.com>
Cc: Vinod Koul <vinod.koul@intel.com>
Cc: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
Cc: dmaengine@vger.kernel.org
Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
parent d3597236
...@@ -774,8 +774,8 @@ static int jz4780_dma_probe(struct platform_device *pdev) ...@@ -774,8 +774,8 @@ static int jz4780_dma_probe(struct platform_device *pdev)
jzdma->irq = ret; jzdma->irq = ret;
ret = devm_request_irq(dev, jzdma->irq, jz4780_dma_irq_handler, 0, ret = request_irq(jzdma->irq, jz4780_dma_irq_handler, 0, dev_name(dev),
dev_name(dev), jzdma); jzdma);
if (ret) { if (ret) {
dev_err(dev, "failed to request IRQ %u!\n", jzdma->irq); dev_err(dev, "failed to request IRQ %u!\n", jzdma->irq);
return ret; return ret;
...@@ -784,7 +784,8 @@ static int jz4780_dma_probe(struct platform_device *pdev) ...@@ -784,7 +784,8 @@ static int jz4780_dma_probe(struct platform_device *pdev)
jzdma->clk = devm_clk_get(dev, NULL); jzdma->clk = devm_clk_get(dev, NULL);
if (IS_ERR(jzdma->clk)) { if (IS_ERR(jzdma->clk)) {
dev_err(dev, "failed to get clock\n"); dev_err(dev, "failed to get clock\n");
return PTR_ERR(jzdma->clk); ret = PTR_ERR(jzdma->clk);
goto err_free_irq;
} }
clk_prepare_enable(jzdma->clk); clk_prepare_enable(jzdma->clk);
...@@ -856,6 +857,9 @@ static int jz4780_dma_probe(struct platform_device *pdev) ...@@ -856,6 +857,9 @@ static int jz4780_dma_probe(struct platform_device *pdev)
err_disable_clk: err_disable_clk:
clk_disable_unprepare(jzdma->clk); clk_disable_unprepare(jzdma->clk);
err_free_irq:
free_irq(jzdma->irq, jzdma);
return ret; return ret;
} }
...@@ -864,7 +868,7 @@ static int jz4780_dma_remove(struct platform_device *pdev) ...@@ -864,7 +868,7 @@ static int jz4780_dma_remove(struct platform_device *pdev)
struct jz4780_dma_dev *jzdma = platform_get_drvdata(pdev); struct jz4780_dma_dev *jzdma = platform_get_drvdata(pdev);
of_dma_controller_free(pdev->dev.of_node); of_dma_controller_free(pdev->dev.of_node);
devm_free_irq(&pdev->dev, jzdma->irq, jzdma); free_irq(jzdma->irq, jzdma);
dma_async_device_unregister(&jzdma->dma_device); dma_async_device_unregister(&jzdma->dma_device);
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment