diff options
author | Maxime Ripard <maxime.ripard@free-electrons.com> | 2014-07-30 04:30:22 -0400 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2014-07-30 09:44:17 -0400 |
commit | 174427c1bb9e7810743f55a90a64da2c29d67b0b (patch) | |
tree | 75b4834190524909ccec81820ac7d0174392f428 /drivers/dma/sun6i-dma.c | |
parent | 92e4a3bf3812b0b0d06c6736fe4d83e1442640ef (diff) |
dmaengine: sun6i: Free the interrupt before killing the tasklet
There's still a small window between the call to sun6i_kill_tasklet and the end
of the driver remove function where a spurious interrupt might trigger, and
start using deallocated resources.
Replace the call to synchronize_irq by a free_irq, so that we're sure that we
won't get any further interrupts when we're deallocating resources.
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma/sun6i-dma.c')
-rw-r--r-- | drivers/dma/sun6i-dma.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/dma/sun6i-dma.c b/drivers/dma/sun6i-dma.c index 609c5d8cb947..63a1db38894e 100644 --- a/drivers/dma/sun6i-dma.c +++ b/drivers/dma/sun6i-dma.c | |||
@@ -836,8 +836,8 @@ static inline void sun6i_kill_tasklet(struct sun6i_dma_dev *sdev) | |||
836 | /* Prevent spurious interrupts from scheduling the tasklet */ | 836 | /* Prevent spurious interrupts from scheduling the tasklet */ |
837 | atomic_inc(&sdev->tasklet_shutdown); | 837 | atomic_inc(&sdev->tasklet_shutdown); |
838 | 838 | ||
839 | /* Make sure all interrupts are handled */ | 839 | /* Make sure we won't have any further interrupts */ |
840 | synchronize_irq(sdev->irq); | 840 | devm_free_irq(sdev->slave.dev, sdev->irq, sdev); |
841 | 841 | ||
842 | /* Actually prevent the tasklet from being scheduled */ | 842 | /* Actually prevent the tasklet from being scheduled */ |
843 | tasklet_kill(&sdev->task); | 843 | tasklet_kill(&sdev->task); |