]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
dmaengine: omap-dma: Use vchan_terminate_vdesc() instead of desc_free
authorPeter Ujfalusi <peter.ujfalusi@ti.com>
Tue, 14 Nov 2017 14:32:05 +0000 (16:32 +0200)
committerVinod Koul <vinod.koul@intel.com>
Mon, 4 Dec 2017 17:03:51 +0000 (22:33 +0530)
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>
drivers/dma/omap-dma.c

index f6dd849159d8637cfaa6a5b2debf76ea1bcc477c..d21c19822feb9184110fcf32673e748b481862bb 100644 (file)
@@ -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)