* [PATCH 1/1] dmaengine: dmatest: use dmaengine_submit() and dmaengine_desc_set_callback()
@ 2026-10-14 14:53 Frank.Li
0 siblings, 0 replies; only message in thread
From: Frank.Li @ 2026-10-14 14:53 UTC (permalink / raw)
To: Vinod Koul, Frank Li,
open list:DMA GENERIC OFFLOAD ENGINE SUBSYSTEM, open list
Cc: imx, Frank Li
From: Frank Li <Frank.Li@nxp.com>
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@nxp.com>
---
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-10-14 14:53 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-14 14:53 [PATCH 1/1] dmaengine: dmatest: use dmaengine_submit() and dmaengine_desc_set_callback() Frank.Li
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®