Commit 3ab553d9 authored by Dave Jiang's avatar Dave Jiang Committed by Vinod Koul

dmaengine: coh901318: 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: default avatarDave Jiang <dave.jiang@intel.com>
Reviewed-by: default avatarLars-Peter Clausen <lars@metafoo.de>
Cc: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
parent a1d4eaaf
...@@ -1888,8 +1888,7 @@ static void dma_tasklet(unsigned long data) ...@@ -1888,8 +1888,7 @@ static void dma_tasklet(unsigned long data)
struct coh901318_chan *cohc = (struct coh901318_chan *) data; struct coh901318_chan *cohc = (struct coh901318_chan *) data;
struct coh901318_desc *cohd_fin; struct coh901318_desc *cohd_fin;
unsigned long flags; unsigned long flags;
dma_async_tx_callback callback; struct dmaengine_desc_callback cb;
void *callback_param;
dev_vdbg(COHC_2_DEV(cohc), "[%s] chan_id %d" dev_vdbg(COHC_2_DEV(cohc), "[%s] chan_id %d"
" nbr_active_done %ld\n", __func__, " nbr_active_done %ld\n", __func__,
...@@ -1904,8 +1903,7 @@ static void dma_tasklet(unsigned long data) ...@@ -1904,8 +1903,7 @@ static void dma_tasklet(unsigned long data)
goto err; goto err;
/* locate callback to client */ /* locate callback to client */
callback = cohd_fin->desc.callback; dmaengine_desc_get_callback(&cohd_fin->desc, &cb);
callback_param = cohd_fin->desc.callback_param;
/* sign this job as completed on the channel */ /* sign this job as completed on the channel */
dma_cookie_complete(&cohd_fin->desc); dma_cookie_complete(&cohd_fin->desc);
...@@ -1920,8 +1918,7 @@ static void dma_tasklet(unsigned long data) ...@@ -1920,8 +1918,7 @@ static void dma_tasklet(unsigned long data)
spin_unlock_irqrestore(&cohc->lock, flags); spin_unlock_irqrestore(&cohc->lock, flags);
/* Call the callback when we're done */ /* Call the callback when we're done */
if (callback) dmaengine_desc_callback_invoke(&cb, NULL);
callback(callback_param);
spin_lock_irqsave(&cohc->lock, flags); spin_lock_irqsave(&cohc->lock, flags);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment