aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2019-12-16 11:53:20 +0100
committerVinod Koul <vkoul@kernel.org>2019-12-26 10:04:18 +0530
commit5c8aacbbb3b706a024eefc376b1d542d59de5749 (patch)
tree29af3184e0699a4c31eb4fa7293943ef06c03162 /drivers/dma
parentdmaengine: print more meaningful error message (diff)
downloadlinux-dev-5c8aacbbb3b706a024eefc376b1d542d59de5749.tar.xz
linux-dev-5c8aacbbb3b706a024eefc376b1d542d59de5749.zip
dmaengine: bcm2835: do not call vchan_vdesc_fini() with lock held
vchan_vdesc_fini() can't be called locked. Instead, call vchan_terminate_vdesc() which delays the freeing of the descriptor to vchan_synchronize(). Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Link: https://lore.kernel.org/r/20191216105328.15198-2-s.hauer@pengutronix.de Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/dma')
-rw-r--r--drivers/dma/bcm2835-dma.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/dma/bcm2835-dma.c b/drivers/dma/bcm2835-dma.c
index e4c593f48575..4768ef26013b 100644
--- a/drivers/dma/bcm2835-dma.c
+++ b/drivers/dma/bcm2835-dma.c
@@ -797,10 +797,7 @@ static int bcm2835_dma_terminate_all(struct dma_chan *chan)
/* stop DMA activity */
if (c->desc) {
- if (c->desc->vd.tx.flags & DMA_PREP_INTERRUPT)
- vchan_terminate_vdesc(&c->desc->vd);
- else
- vchan_vdesc_fini(&c->desc->vd);
+ vchan_terminate_vdesc(&c->desc->vd);
c->desc = NULL;
bcm2835_dma_abort(c);
}