diff options
author | Dave Jiang <dave.jiang@intel.com> | 2016-07-20 16:12:29 -0400 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2016-08-07 22:41:40 -0400 |
commit | 5c066f7d01917ed76f2b8d395d7da3070ff16455 (patch) | |
tree | 7eb4331a5d2c4a875eb52215e01bf50b9761b8c8 | |
parent | 0024b2ac374490de46bfd35c43002c7800ad14ed (diff) |
dmaengine: pch_dma: 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>
-rw-r--r-- | drivers/dma/pch_dma.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/dma/pch_dma.c b/drivers/dma/pch_dma.c index 113605f6fe20..df95727dc2fb 100644 --- a/drivers/dma/pch_dma.c +++ b/drivers/dma/pch_dma.c | |||
@@ -357,14 +357,13 @@ static void pdc_chain_complete(struct pch_dma_chan *pd_chan, | |||
357 | struct pch_dma_desc *desc) | 357 | struct pch_dma_desc *desc) |
358 | { | 358 | { |
359 | struct dma_async_tx_descriptor *txd = &desc->txd; | 359 | struct dma_async_tx_descriptor *txd = &desc->txd; |
360 | dma_async_tx_callback callback = txd->callback; | 360 | struct dmaengine_desc_callback cb; |
361 | void *param = txd->callback_param; | ||
362 | 361 | ||
362 | dmaengine_desc_get_callback(txd, &cb); | ||
363 | list_splice_init(&desc->tx_list, &pd_chan->free_list); | 363 | list_splice_init(&desc->tx_list, &pd_chan->free_list); |
364 | list_move(&desc->desc_node, &pd_chan->free_list); | 364 | list_move(&desc->desc_node, &pd_chan->free_list); |
365 | 365 | ||
366 | if (callback) | 366 | dmaengine_desc_callback_invoke(&cb, NULL); |
367 | callback(param); | ||
368 | } | 367 | } |
369 | 368 | ||
370 | static void pdc_complete_all(struct pch_dma_chan *pd_chan) | 369 | static void pdc_complete_all(struct pch_dma_chan *pd_chan) |