diff options
author | Alex Smith <alex.smith@imgtec.com> | 2015-07-24 17:24:27 +0100 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2015-08-18 22:28:50 +0530 |
commit | ae9c02b421139c4c44340b019e250a9969a91613 (patch) | |
tree | a1a62adeffd8d80b74da68f147ef10f7a344a4e7 /drivers/dma | |
parent | d509a83cea8a64478c7899f28e961543b6569cfc (diff) | |
download | blackbird-op-linux-ae9c02b421139c4c44340b019e250a9969a91613.tar.gz blackbird-op-linux-ae9c02b421139c4c44340b019e250a9969a91613.zip |
dmaengine: jz4780: Kill tasklets before unregistering the device
Tasklets may have been scheduled as a result of an earlier interrupt
that could still be running. Kill them before unregistering the
device.
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>
Diffstat (limited to 'drivers/dma')
-rw-r--r-- | drivers/dma/dma-jz4780.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/dma/dma-jz4780.c b/drivers/dma/dma-jz4780.c index d6cae6cb5b7a..dade7c47ff18 100644 --- a/drivers/dma/dma-jz4780.c +++ b/drivers/dma/dma-jz4780.c @@ -866,9 +866,15 @@ err_free_irq: static int jz4780_dma_remove(struct platform_device *pdev) { struct jz4780_dma_dev *jzdma = platform_get_drvdata(pdev); + int i; of_dma_controller_free(pdev->dev.of_node); + free_irq(jzdma->irq, jzdma); + + for (i = 0; i < JZ_DMA_NR_CHANNELS; i++) + tasklet_kill(&jzdma->chan[i].vchan.task); + dma_async_device_unregister(&jzdma->dma_device); return 0; } |