Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dmaengine: timb_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>

authored by

Dave Jiang and committed by
Vinod Koul
a06a5bb9 370c0446

+3 -6
+3 -6
drivers/dma/timb_dma.c
··· 226 226 227 227 static void __td_finish(struct timb_dma_chan *td_chan) 228 228 { 229 - dma_async_tx_callback callback; 230 - void *param; 229 + struct dmaengine_desc_callback cb; 231 230 struct dma_async_tx_descriptor *txd; 232 231 struct timb_dma_desc *td_desc; 233 232 ··· 251 252 dma_cookie_complete(txd); 252 253 td_chan->ongoing = false; 253 254 254 - callback = txd->callback; 255 - param = txd->callback_param; 255 + dmaengine_desc_get_callback(txd, &cb); 256 256 257 257 list_move(&td_desc->desc_node, &td_chan->free_list); 258 258 ··· 260 262 * The API requires that no submissions are done from a 261 263 * callback, so we don't need to drop the lock here 262 264 */ 263 - if (callback) 264 - callback(param); 265 + dmaengine_desc_callback_invoke(&cb, NULL); 265 266 } 266 267 267 268 static u32 __td_ier_mask(struct timb_dma *td)