diff options
author | Peter Ujfalusi <peter.ujfalusi@ti.com> | 2017-11-14 16:32:03 +0200 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2017-12-04 22:33:51 +0530 |
commit | 6af149d2b1422e0e873d8558274713e6f63142c2 (patch) | |
tree | 781a20e50da84484666dc5152bbead514d59f386 /drivers/dma/virt-dma.c | |
parent | 4fbd8d194f06c8a3fd2af1ce560ddb31f7ec8323 (diff) |
dmaengine: virt-dma: Add helper to free/reuse a descriptor
The vchan_vdesc_fini() can be used to free or reuse a given descriptor
after it has been marked as completed.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma/virt-dma.c')
-rw-r--r-- | drivers/dma/virt-dma.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/dma/virt-dma.c b/drivers/dma/virt-dma.c index 545e97279083..88ad8ed2a8d6 100644 --- a/drivers/dma/virt-dma.c +++ b/drivers/dma/virt-dma.c @@ -107,10 +107,7 @@ static void vchan_complete(unsigned long arg) dmaengine_desc_get_callback(&vd->tx, &cb); list_del(&vd->node); - if (dmaengine_desc_test_reuse(&vd->tx)) - list_add(&vd->node, &vc->desc_allocated); - else - vc->desc_free(vd); + vchan_vdesc_fini(vd); dmaengine_desc_callback_invoke(&cb, NULL); } |