summaryrefslogtreecommitdiff
path: root/drivers/dma/nbpfaxi.c
diff options
context:
space:
mode:
authorVinod Koul <vinod.koul@intel.com>2016-07-04 16:01:18 +0530
committerVinod Koul <vinod.koul@intel.com>2016-07-16 20:19:04 +0530
commit84c610ba5476b6c38ef8e6bc834993bb38cf1208 (patch)
treec18d77cbd83389184a266809b540ba22efd73893 /drivers/dma/nbpfaxi.c
parent144fa37f5b4f9b81dfab79c8d440b4aba8b07fde (diff)
dmaengine: nbpfaxi: explicitly freeup irq
dmaengine device should explicitly call devm_free_irq() when using devm_request_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: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com>
Diffstat (limited to 'drivers/dma/nbpfaxi.c')
-rw-r--r--drivers/dma/nbpfaxi.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/dma/nbpfaxi.c b/drivers/dma/nbpfaxi.c
index 9f0e98b75eb9..f489f4e3429f 100644
--- a/drivers/dma/nbpfaxi.c
+++ b/drivers/dma/nbpfaxi.c
@@ -227,6 +227,7 @@ struct nbpf_device {
void __iomem *base;
struct clk *clk;
const struct nbpf_config *config;
+ unsigned int eirq;
struct nbpf_channel chan[];
};
@@ -1375,6 +1376,7 @@ static int nbpf_probe(struct platform_device *pdev)
IRQF_SHARED, "dma error", nbpf);
if (ret < 0)
return ret;
+ nbpf->eirq = eirq;
INIT_LIST_HEAD(&dma_dev->channels);
@@ -1446,6 +1448,15 @@ e_clk_off:
static int nbpf_remove(struct platform_device *pdev)
{
struct nbpf_device *nbpf = platform_get_drvdata(pdev);
+ int i;
+
+ devm_free_irq(&pdev->dev, nbpf->eirq, nbpf);
+
+ for (i = 0; i < nbpf->config->num_channels; i++) {
+ struct nbpf_channel *chan = nbpf->chan + i;
+
+ devm_free_irq(&pdev->dev, chan->irq, chan);
+ }
of_dma_controller_free(pdev->dev.of_node);
dma_async_device_unregister(&nbpf->dma_dev);