diff options
author | Dave Jiang <dave.jiang@intel.com> | 2016-07-20 13:13:28 -0700 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2016-08-08 08:11:41 +0530 |
commit | d254c8d0a725f566dc83d4dda81980c63d7f3838 (patch) | |
tree | 8db78ea595e27380f0da3b953078341b97f8d5f9 /drivers/dma/txx9dmac.c | |
parent | a06a5bb908248cdc4f696ae5b6334e3b2e150fbc (diff) | |
download | talos-obmc-linux-d254c8d0a725f566dc83d4dda81980c63d7f3838.tar.gz talos-obmc-linux-d254c8d0a725f566dc83d4dda81980c63d7f3838.zip |
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>
Diffstat (limited to 'drivers/dma/txx9dmac.c')
-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 txx9dmac_descriptor_complete(struct txx9dmac_chan *dc, struct txx9dmac_desc *desc) { - dma_async_tx_callback callback; - void *param; + struct dmaengine_desc_callback cb; struct dma_async_tx_descriptor *txd = &desc->txd; dev_vdbg(chan2dev(&dc->chan), "descriptor %u %p complete\n", txd->cookie, desc); dma_cookie_complete(txd); - callback = txd->callback; - param = txd->callback_param; + dmaengine_desc_get_callback(txd, &cb); txx9dmac_sync_desc_for_cpu(dc, desc); list_splice_init(&desc->tx_list, &dc->free_list); @@ -423,8 +421,7 @@ txx9dmac_descriptor_complete(struct txx9dmac_chan *dc, * The API requires that no submissions are done from a * callback, so we don't need to drop the lock here */ - if (callback) - callback(param); + dmaengine_desc_callback_invoke(&cb, NULL); dma_run_dependencies(txd); } |