summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Smith <alex.smith@imgtec.com>2015-07-24 17:24:26 +0100
committerVinod Koul <vinod.koul@intel.com>2015-08-18 22:28:50 +0530
commitd509a83cea8a64478c7899f28e961543b6569cfc (patch)
tree1e56568240c884e391b9a9921c881fbb95b3560c
parentd3597236fd30d76bef4ba8b4713013006842f117 (diff)
downloadblackbird-op-linux-d509a83cea8a64478c7899f28e961543b6569cfc.tar.gz
blackbird-op-linux-d509a83cea8a64478c7899f28e961543b6569cfc.zip
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: Alex 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: Vinod Koul <vinod.koul@intel.com>
-rw-r--r--drivers/dma/dma-jz4780.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/dma/dma-jz4780.c b/drivers/dma/dma-jz4780.c
index 572e07e4b42d..d6cae6cb5b7a 100644
--- a/drivers/dma/dma-jz4780.c
+++ b/drivers/dma/dma-jz4780.c
@@ -774,8 +774,8 @@ static int jz4780_dma_probe(struct platform_device *pdev)
jzdma->irq = ret;
- ret = devm_request_irq(dev, jzdma->irq, jz4780_dma_irq_handler, 0,
- dev_name(dev), jzdma);
+ ret = request_irq(jzdma->irq, jz4780_dma_irq_handler, 0, dev_name(dev),
+ jzdma);
if (ret) {
dev_err(dev, "failed to request IRQ %u!\n", jzdma->irq);
return ret;
@@ -784,7 +784,8 @@ static int jz4780_dma_probe(struct platform_device *pdev)
jzdma->clk = devm_clk_get(dev, NULL);
if (IS_ERR(jzdma->clk)) {
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);
@@ -856,6 +857,9 @@ err_unregister_dev:
err_disable_clk:
clk_disable_unprepare(jzdma->clk);
+
+err_free_irq:
+ free_irq(jzdma->irq, jzdma);
return ret;
}
@@ -864,7 +868,7 @@ static int jz4780_dma_remove(struct platform_device *pdev)
struct jz4780_dma_dev *jzdma = platform_get_drvdata(pdev);
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);
return 0;
}
OpenPOWER on IntegriCloud