Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5c066f7d authored by Dave Jiang's avatar Dave Jiang Committed by Vinod Koul
Browse files

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: default avatarDave Jiang <dave.jiang@intel.com>
Reviewed-by: default avatarLars-Peter Clausen <lars@metafoo.de>
Signed-off-by: default avatarVinod Koul <vinod.koul@intel.com>
parent 0024b2ac
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -357,14 +357,13 @@ static void pdc_chain_complete(struct pch_dma_chan *pd_chan,
			       struct pch_dma_desc *desc)
{
	struct dma_async_tx_descriptor *txd = &desc->txd;
	dma_async_tx_callback callback = txd->callback;
	void *param = txd->callback_param;
	struct dmaengine_desc_callback cb;

	dmaengine_desc_get_callback(txd, &cb);
	list_splice_init(&desc->tx_list, &pd_chan->free_list);
	list_move(&desc->desc_node, &pd_chan->free_list);

	if (callback)
		callback(param);
	dmaengine_desc_callback_invoke(&cb, NULL);
}

static void pdc_complete_all(struct pch_dma_chan *pd_chan)