[PATCH 1/1] dmaengine: dmatest: use dmaengine_submit() and dmaengine_desc_set_callback()
From: Frank . Li
Date: Wed Oct 14 2026 - 10:58:28 EST
From: Frank Li <Frank.Li@xxxxxxx>
Direct assignment to tx->callback and tx->callback_param bypasses the
dmaengine descriptor API. Replace them with dmaengine_desc_set_callback()
and replace the tx->tx_submit() call with dmaengine_submit(), which are
the proper interfaces for dmaengine clients.
Prepare to make struct dma_async_tx_descriptor private.
Signed-off-by: Frank Li <Frank.Li@xxxxxxx>
---
base on https://git.kernel.org/pub/scm/linux/kernel/git/vkoul/dmaengine.git/ next
---
drivers/dma/dmatest.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/dma/dmatest.c b/drivers/dma/dmatest.c
index 2ae3469397f37..3f0b7e15abf05 100644
--- a/drivers/dma/dmatest.c
+++ b/drivers/dma/dmatest.c
@@ -822,11 +822,11 @@ static int dmatest_func(void *data)
}
done->done = false;
- if (!params->polled) {
- tx->callback = dmatest_callback;
- tx->callback_param = done;
- }
- cookie = tx->tx_submit(tx);
+ if (!params->polled)
+ dmaengine_desc_set_callback(tx, dmatest_callback, NULL,
+ done);
+
+ cookie = dmaengine_submit(tx);
if (dma_submit_error(cookie)) {
result("submit error", total_tests, src->off,
--
2.43.0