From: Peter Ujfalusi Date: Tue, 14 Nov 2017 14:32:05 +0000 (+0200) Subject: dmaengine: omap-dma: Use vchan_terminate_vdesc() instead of desc_free X-Git-Tag: v4.16-rc1~138^2~1^2~7 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=b1faf0f564ffa6c58f7c7c9a9263dc0f7f78e215;p=linux.git dmaengine: omap-dma: Use vchan_terminate_vdesc() instead of desc_free To avoid race with vchan_complete, use the race free way to terminate running transfer. Signed-off-by: Peter Ujfalusi Signed-off-by: Vinod Koul --- diff --git a/drivers/dma/omap-dma.c b/drivers/dma/omap-dma.c index f6dd849159d8..d21c19822feb 100644 --- a/drivers/dma/omap-dma.c +++ b/drivers/dma/omap-dma.c @@ -1311,7 +1311,7 @@ static int omap_dma_terminate_all(struct dma_chan *chan) * c->desc is NULL and exit.) */ if (c->desc) { - omap_dma_desc_free(&c->desc->vd); + vchan_terminate_vdesc(&c->desc->vd); c->desc = NULL; /* Avoid stopping the dma twice */ if (!c->paused)