Skip to content

Commit

Permalink
dmaengine: omap-dma: Use vchan_terminate_vdesc() instead of desc_free
Browse files Browse the repository at this point in the history
To avoid race with vchan_complete, use the race free way to terminate
running transfer.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
  • Loading branch information
Peter Ujfalusi authored and Vinod Koul committed Dec 4, 2017
1 parent 1c7f072 commit b1faf0f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/dma/omap-dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit b1faf0f

Please sign in to comment.