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

dmaengine: ste_dma40: 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 b8bdebb9
...@@ -1596,8 +1596,7 @@ static void dma_tasklet(unsigned long data) ...@@ -1596,8 +1596,7 @@ static void dma_tasklet(unsigned long data)
struct d40_desc *d40d; struct d40_desc *d40d;
unsigned long flags; unsigned long flags;
bool callback_active; bool callback_active;
dma_async_tx_callback callback; struct dmaengine_desc_callback cb;
void *callback_param;
spin_lock_irqsave(&d40c->lock, flags); spin_lock_irqsave(&d40c->lock, flags);
...@@ -1624,8 +1623,7 @@ static void dma_tasklet(unsigned long data) ...@@ -1624,8 +1623,7 @@ static void dma_tasklet(unsigned long data)
/* Callback to client */ /* Callback to client */
callback_active = !!(d40d->txd.flags & DMA_PREP_INTERRUPT); callback_active = !!(d40d->txd.flags & DMA_PREP_INTERRUPT);
callback = d40d->txd.callback; dmaengine_desc_get_callback(&d40d->txd, &cb);
callback_param = d40d->txd.callback_param;
if (!d40d->cyclic) { if (!d40d->cyclic) {
if (async_tx_test_ack(&d40d->txd)) { if (async_tx_test_ack(&d40d->txd)) {
...@@ -1646,8 +1644,8 @@ static void dma_tasklet(unsigned long data) ...@@ -1646,8 +1644,8 @@ static void dma_tasklet(unsigned long data)
spin_unlock_irqrestore(&d40c->lock, flags); spin_unlock_irqrestore(&d40c->lock, flags);
if (callback_active && callback) if (callback_active)
callback(callback_param); dmaengine_desc_callback_invoke(&cb, NULL);
return; return;
......
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