aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Jiang <dave.jiang@intel.com>2016-07-20 16:12:47 -0400
committerVinod Koul <vinod.koul@intel.com>2016-08-07 22:41:41 -0400
commit5ade6683e916df6a00a9747ccc40191fff83a064 (patch)
tree0f1fbbf16e4573ac05884c8fc790e0d28b6fe145
parent44967bf73352ccc0ea9346fc1c7dd805bc2279b5 (diff)
dmaengine: qcom_hidma: convert callback to helper function
This is in preperation of moving to a callback that provides results to the callback for the transaction. The conversion will maintain current behavior and the driver must convert to new callback mechanism at a later time in order to receive results. Signed-off-by: Dave Jiang <dave.jiang@intel.com> Reviewed-by: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Sinan Kaya <okaya@codeaurora.org> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
-rw-r--r--drivers/dma/qcom/hidma.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/dma/qcom/hidma.c b/drivers/dma/qcom/hidma.c
index b2374cd91e45..1197fbf8f30e 100644
--- a/drivers/dma/qcom/hidma.c
+++ b/drivers/dma/qcom/hidma.c
@@ -132,8 +132,8 @@ static void hidma_process_completed(struct hidma_chan *mchan)
132 spin_unlock_irqrestore(&mchan->lock, irqflags); 132 spin_unlock_irqrestore(&mchan->lock, irqflags);
133 133
134 llstat = hidma_ll_status(mdma->lldev, mdesc->tre_ch); 134 llstat = hidma_ll_status(mdma->lldev, mdesc->tre_ch);
135 if (desc->callback && (llstat == DMA_COMPLETE)) 135 if (llstat == DMA_COMPLETE)
136 desc->callback(desc->callback_param); 136 dmaengine_desc_get_callback_invoke(desc, NULL);
137 137
138 last_cookie = desc->cookie; 138 last_cookie = desc->cookie;
139 dma_run_dependencies(desc); 139 dma_run_dependencies(desc);
@@ -413,14 +413,9 @@ static int hidma_terminate_channel(struct dma_chan *chan)
413 /* return all user requests */ 413 /* return all user requests */
414 list_for_each_entry_safe(mdesc, tmp, &list, node) { 414 list_for_each_entry_safe(mdesc, tmp, &list, node) {
415 struct dma_async_tx_descriptor *txd = &mdesc->desc; 415 struct dma_async_tx_descriptor *txd = &mdesc->desc;
416 dma_async_tx_callback callback = mdesc->desc.callback;
417 void *param = mdesc->desc.callback_param;
418 416
419 dma_descriptor_unmap(txd); 417 dma_descriptor_unmap(txd);
420 418 dmaengine_desc_get_callback_invoke(txd, NULL);
421 if (callback)
422 callback(param);
423
424 dma_run_dependencies(txd); 419 dma_run_dependencies(txd);
425 420
426 /* move myself to free_list */ 421 /* move myself to free_list */