[PATCH v3 8/9] media: xilinx: use dmaengine_desc_set_callback()

Frank.Li at oss.nxp.com Frank.Li at oss.nxp.com
Tue Nov 3 07:37:08 PST 2026


From: Frank Li <Frank.Li at nxp.com>

Replace open-coded assignments to callback and callback_param fields
of struct dma_async_tx_descriptor with calls to the
dmaengine_desc_set_callback() helper.

No functional change intended. Prepare to make struct
dma_async_tx_descriptor private to the DMA engine.

Signed-off-by: Frank Li <Frank.Li at nxp.com>
---
change in v3
  split to simple patch
https://lore.kernel.org/imx/38f6a9abf37b06318bb6429ac04807941ca8d558.camel@collabora.com/
---
 drivers/media/platform/xilinx/xilinx-dma.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/media/platform/xilinx/xilinx-dma.c b/drivers/media/platform/xilinx/xilinx-dma.c
index fcfe0883aba5f..ece2116639fc0 100644
--- a/drivers/media/platform/xilinx/xilinx-dma.c
+++ b/drivers/media/platform/xilinx/xilinx-dma.c
@@ -358,8 +358,7 @@ static void xvip_dma_buffer_queue(struct vb2_buffer *vb)
 		vb2_buffer_done(&buf->buf.vb2_buf, VB2_BUF_STATE_ERROR);
 		return;
 	}
-	desc->callback = xvip_dma_complete;
-	desc->callback_param = buf;
+	dmaengine_desc_set_callback(desc, xvip_dma_complete, NULL, buf);
 
 	spin_lock_irq(&dma->queued_lock);
 	list_add_tail(&buf->queue, &dma->queued_bufs);
-- 
2.43.0




More information about the linux-arm-kernel mailing list