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

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

dmaengine: pl330: 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 5c066f7d
Loading
Loading
Loading
Loading
+4 −6
Original line number Diff line number Diff line
@@ -2039,14 +2039,12 @@ static void pl330_tasklet(unsigned long data)
	}

	while (!list_empty(&pch->completed_list)) {
		dma_async_tx_callback callback;
		void *callback_param;
		struct dmaengine_desc_callback cb;

		desc = list_first_entry(&pch->completed_list,
					struct dma_pl330_desc, node);

		callback = desc->txd.callback;
		callback_param = desc->txd.callback_param;
		dmaengine_desc_get_callback(&desc->txd, &cb);

		if (pch->cyclic) {
			desc->status = PREP;
@@ -2064,9 +2062,9 @@ static void pl330_tasklet(unsigned long data)

		dma_descriptor_unmap(&desc->txd);

		if (callback) {
		if (dmaengine_desc_callback_valid(&cb)) {
			spin_unlock_irqrestore(&pch->lock, flags);
			callback(callback_param);
			dmaengine_desc_callback_invoke(&cb, NULL);
			spin_lock_irqsave(&pch->lock, flags);
		}
	}