[PATCH v3 7/9] media: ti: omap: use dmaengine_desc_set_callback()

From: Frank . Li

Date: Tue Nov 03 2026 - 11:48:07 EST


From: Frank Li <Frank.Li@xxxxxxx>

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@xxxxxxx>
---
change in v3
split to simple patch
https://lore.kernel.org/imx/38f6a9abf37b06318bb6429ac04807941ca8d558.camel@xxxxxxxxxxxxx/
---
drivers/media/platform/ti/omap/omap_vout_vrfb.c | 3 +--
drivers/media/platform/ti/omap3isp/isphist.c | 3 +--
2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/media/platform/ti/omap/omap_vout_vrfb.c b/drivers/media/platform/ti/omap/omap_vout_vrfb.c
index 0cfa0169875f0..006a4ae45a232 100644
--- a/drivers/media/platform/ti/omap/omap_vout_vrfb.c
+++ b/drivers/media/platform/ti/omap/omap_vout_vrfb.c
@@ -273,8 +273,7 @@ int omap_vout_prepare_vrfb(struct omap_vout_device *vout,
return -EINVAL;
}

- tx->callback = omap_vout_vrfb_dma_tx_callback;
- tx->callback_param = &vout->vrfb_dma_tx;
+ dmaengine_desc_set_callback(tx, omap_vout_vrfb_dma_tx_callback, NULL, &vout->vrfb_dma_tx);

cookie = dmaengine_submit(tx);
if (dma_submit_error(cookie)) {
diff --git a/drivers/media/platform/ti/omap3isp/isphist.c b/drivers/media/platform/ti/omap3isp/isphist.c
index dc02f240ee89a..281bd0e3748e9 100644
--- a/drivers/media/platform/ti/omap3isp/isphist.c
+++ b/drivers/media/platform/ti/omap3isp/isphist.c
@@ -209,8 +209,7 @@ static int hist_buf_dma(struct ispstat *hist)
goto error;
}

- tx->callback = hist_dma_cb;
- tx->callback_param = hist;
+ dmaengine_desc_set_callback(tx, hist_dma_cb, NULL, hist);
cookie = dmaengine_submit(tx);
if (dma_submit_error(cookie)) {
dev_dbg(hist->isp->dev, "hist: DMA submission failed\n");
--
2.43.0