diff options
author | Dave Jiang <dave.jiang@intel.com> | 2016-07-20 13:12:35 -0700 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2016-08-08 08:11:40 +0530 |
commit | f08462c650a7e2ec5b68adef94505e1c34fdb309 (patch) | |
tree | 29bef67557ea770bc34b2d72327cf69930e4bf32 /drivers | |
parent | 5c066f7d01917ed76f2b8d395d7da3070ff16455 (diff) | |
download | linux-f08462c650a7e2ec5b68adef94505e1c34fdb309.tar.bz2 |
dmaengine: pl330: 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>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/dma/pl330.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c index 4fc3ffbd5ca0..1ecd4674aa23 100644 --- a/drivers/dma/pl330.c +++ b/drivers/dma/pl330.c @@ -2039,14 +2039,12 @@ static void pl330_tasklet(unsigned long data) } while (!list_empty(&pch->completed_list)) { - dma_async_tx_callback callback; - void *callback_param; + struct dmaengine_desc_callback cb; desc = list_first_entry(&pch->completed_list, struct dma_pl330_desc, node); - callback = desc->txd.callback; - callback_param = desc->txd.callback_param; + dmaengine_desc_get_callback(&desc->txd, &cb); if (pch->cyclic) { desc->status = PREP; @@ -2064,9 +2062,9 @@ static void pl330_tasklet(unsigned long data) dma_descriptor_unmap(&desc->txd); - if (callback) { + if (dmaengine_desc_callback_valid(&cb)) { spin_unlock_irqrestore(&pch->lock, flags); - callback(callback_param); + dmaengine_desc_callback_invoke(&cb, NULL); spin_lock_irqsave(&pch->lock, flags); } } |