diff options
author | Vinod Koul <vinod.koul@intel.com> | 2016-07-28 10:10:37 +0530 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2016-07-28 10:10:37 +0530 |
commit | 4bb0439626983fdde5af3ce970bd0ba2070f5378 (patch) | |
tree | 081166e9a6bd98eef39f41171f2e2ef014413bb3 /drivers/dma/dma-jz4740.c | |
parent | 89b90c09b5d505dcff1068054f1fc2d2704e909f (diff) | |
parent | 184ff2aa3c0ba7f1cd44ed7e8d766e12e43694e2 (diff) |
Merge branch 'topic/dmaengine_cleanups' into for-linus
Diffstat (limited to 'drivers/dma/dma-jz4740.c')
-rw-r--r-- | drivers/dma/dma-jz4740.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/dma/dma-jz4740.c b/drivers/dma/dma-jz4740.c index 7638b24ce8d0..9689b36c005a 100644 --- a/drivers/dma/dma-jz4740.c +++ b/drivers/dma/dma-jz4740.c @@ -573,12 +573,26 @@ err_unregister: return ret; } +static void jz4740_cleanup_vchan(struct dma_device *dmadev) +{ + struct jz4740_dmaengine_chan *chan, *_chan; + + list_for_each_entry_safe(chan, _chan, + &dmadev->channels, vchan.chan.device_node) { + list_del(&chan->vchan.chan.device_node); + tasklet_kill(&chan->vchan.task); + } +} + + static int jz4740_dma_remove(struct platform_device *pdev) { struct jz4740_dma_dev *dmadev = platform_get_drvdata(pdev); int irq = platform_get_irq(pdev, 0); free_irq(irq, dmadev); + + jz4740_cleanup_vchan(&dmadev->ddev); dma_async_device_unregister(&dmadev->ddev); clk_disable_unprepare(dmadev->clk); |