diff options
author | Vinod Koul <vinod.koul@intel.com> | 2016-07-28 06:40:37 +0200 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2016-07-28 06:40:37 +0200 |
commit | 4bb0439626983fdde5af3ce970bd0ba2070f5378 (patch) | |
tree | 081166e9a6bd98eef39f41171f2e2ef014413bb3 /drivers/dma/nbpfaxi.c | |
parent | dmaengine: k3dma: add missing clk_disable_unprepare() on error in k3_dma_probe() (diff) | |
parent | dmaengine: ioat: statify symbol (diff) | |
download | linux-4bb0439626983fdde5af3ce970bd0ba2070f5378.tar.xz linux-4bb0439626983fdde5af3ce970bd0ba2070f5378.zip |
Merge branch 'topic/dmaengine_cleanups' into for-linus
Diffstat (limited to 'drivers/dma/nbpfaxi.c')
-rw-r--r-- | drivers/dma/nbpfaxi.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/dma/nbpfaxi.c b/drivers/dma/nbpfaxi.c index 9f0e98b75eb9..08c45c185549 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,17 @@ 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); + + tasklet_kill(&chan->tasklet); + } of_dma_controller_free(pdev->dev.of_node); dma_async_device_unregister(&nbpf->dma_dev); |