提交 b167f94d 编写于 作者: S Sascha Hauer 提交者: Vinod Koul

dmaengine: virt-dma: use vchan_vdesc_fini() to free descriptors

vchan_dma_desc_free_list() basically open codes vchan_vdesc_fini() in its
loop body. Call it directly rather than duplicating the code.
Signed-off-by: NSascha Hauer <s.hauer@pengutronix.de>
Reviewed-by: NPeter Ujfalusi <peter.ujfalusi@ti.com>
Tested-by: NPeter Ujfalusi <peter.ujfalusi@ti.com>
Link: https://lore.kernel.org/r/20191216105328.15198-7-s.hauer@pengutronix.deSigned-off-by: NVinod Koul <vkoul@kernel.org>
上级 9f91e6bf
...@@ -115,16 +115,8 @@ void vchan_dma_desc_free_list(struct virt_dma_chan *vc, struct list_head *head) ...@@ -115,16 +115,8 @@ void vchan_dma_desc_free_list(struct virt_dma_chan *vc, struct list_head *head)
struct virt_dma_desc *vd, *_vd; struct virt_dma_desc *vd, *_vd;
list_for_each_entry_safe(vd, _vd, head, node) { list_for_each_entry_safe(vd, _vd, head, node) {
if (dmaengine_desc_test_reuse(&vd->tx)) { list_del(&vd->node);
unsigned long flags; vchan_vdesc_fini(vd);
spin_lock_irqsave(&vc->lock, flags);
list_move_tail(&vd->node, &vc->desc_allocated);
spin_unlock_irqrestore(&vc->lock, flags);
} else {
list_del(&vd->node);
vc->desc_free(vd);
}
} }
} }
EXPORT_SYMBOL_GPL(vchan_dma_desc_free_list); EXPORT_SYMBOL_GPL(vchan_dma_desc_free_list);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册