diff options
author | Dave Jiang <dave.jiang@intel.com> | 2016-07-20 16:13:28 -0400 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2016-08-07 22:41:41 -0400 |
commit | d254c8d0a725f566dc83d4dda81980c63d7f3838 (patch) | |
tree | 8db78ea595e27380f0da3b953078341b97f8d5f9 | |
parent | a06a5bb908248cdc4f696ae5b6334e3b2e150fbc (diff) |
dmaengine: txx9dmac: 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/txx9dmac.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/dma/txx9dmac.c b/drivers/dma/txx9dmac.c index 7632290e7c14..4d8c7b9078fd 100644 --- a/drivers/dma/txx9dmac.c +++ b/drivers/dma/txx9dmac.c | |||
@@ -403,16 +403,14 @@ static void | |||
403 | txx9dmac_descriptor_complete(struct txx9dmac_chan *dc, | 403 | txx9dmac_descriptor_complete(struct txx9dmac_chan *dc, |
404 | struct txx9dmac_desc *desc) | 404 | struct txx9dmac_desc *desc) |
405 | { | 405 | { |
406 | dma_async_tx_callback callback; | 406 | struct dmaengine_desc_callback cb; |
407 | void *param; | ||
408 | struct dma_async_tx_descriptor *txd = &desc->txd; | 407 | struct dma_async_tx_descriptor *txd = &desc->txd; |
409 | 408 | ||
410 | dev_vdbg(chan2dev(&dc->chan), "descriptor %u %p complete\n", | 409 | dev_vdbg(chan2dev(&dc->chan), "descriptor %u %p complete\n", |
411 | txd->cookie, desc); | 410 | txd->cookie, desc); |
412 | 411 | ||
413 | dma_cookie_complete(txd); | 412 | dma_cookie_complete(txd); |
414 | callback = txd->callback; | 413 | dmaengine_desc_get_callback(txd, &cb); |
415 | param = txd->callback_param; | ||
416 | 414 | ||
417 | txx9dmac_sync_desc_for_cpu(dc, desc); | 415 | txx9dmac_sync_desc_for_cpu(dc, desc); |
418 | list_splice_init(&desc->tx_list, &dc->free_list); | 416 | list_splice_init(&desc->tx_list, &dc->free_list); |
@@ -423,8 +421,7 @@ txx9dmac_descriptor_complete(struct txx9dmac_chan *dc, | |||
423 | * The API requires that no submissions are done from a | 421 | * The API requires that no submissions are done from a |
424 | * callback, so we don't need to drop the lock here | 422 | * callback, so we don't need to drop the lock here |
425 | */ | 423 | */ |
426 | if (callback) | 424 | dmaengine_desc_callback_invoke(&cb, NULL); |
427 | callback(param); | ||
428 | dma_run_dependencies(txd); | 425 | dma_run_dependencies(txd); |
429 | } | 426 | } |
430 | 427 | ||