mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
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 <[email protected]> Cc: Vinod Koul <[email protected]> Cc: Zubair Lutfullah Kakakhel <[email protected]> Cc: [email protected] Signed-off-by: Vinod Koul <[email protected]>
This commit is contained in:
parent
d509a83cea
commit
ae9c02b421
1 changed files with 6 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue