Convert driver to use the new helper function for callback Signed-off-by: Dave Jiang <dave.jiang@xxxxxxxxx> --- drivers/dma/qcom/hidma.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/drivers/dma/qcom/hidma.c b/drivers/dma/qcom/hidma.c index 41b5c6d..aafc49a 100644 --- a/drivers/dma/qcom/hidma.c +++ b/drivers/dma/qcom/hidma.c @@ -132,8 +132,12 @@ static void hidma_process_completed(struct hidma_chan *mchan) spin_unlock_irqrestore(&mchan->lock, irqflags); llstat = hidma_ll_status(mdma->lldev, mdesc->tre_ch); - if (desc->callback && (llstat == DMA_COMPLETE)) - desc->callback(desc->callback_param); + if (llstat == DMA_COMPLETE) { + struct dmaengine_desc_callback cb; + + dmaengine_desc_get_callback(desc, &cb); + dmaengine_desc_callback_invoke(&cb, NULL); + } last_cookie = desc->cookie; dma_run_dependencies(desc); @@ -413,13 +417,12 @@ static int hidma_terminate_channel(struct dma_chan *chan) /* return all user requests */ list_for_each_entry_safe(mdesc, tmp, &list, node) { struct dma_async_tx_descriptor *txd = &mdesc->desc; - dma_async_tx_callback callback = mdesc->desc.callback; - void *param = mdesc->desc.callback_param; + struct dmaengine_desc_callback cb; + dmaengine_desc_get_callback(&mdesc->desc, &cb); dma_descriptor_unmap(txd); - if (callback) - callback(param); + dmaengine_desc_callback_invoke(&cb, NULL); dma_run_dependencies(txd); -- To unsubscribe from this list: send the line "unsubscribe dmaengine" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html