* [PATCH 1/1] usb: musb: use dmaengine_desc_set_callback()
@ 2026-11-02 18:02 Frank.Li
2026-11-02 18:05 ` sashiko-bot
0 siblings, 1 reply; 2+ messages in thread
From: Frank.Li @ 2026-11-02 18:02 UTC (permalink / raw)
To: Bin Liu, Greg Kroah-Hartman, Frank Li,
open list:MUSB MULTIPOINT HIGH SPEED DUAL-ROLE CONTROLLER,
open list, open list:OMAP USB SUPPORT
Cc: imx, vkoul
From: Frank Li <Frank.Li@nxp.com>
Replace open-coded assignments to callback, callback_result, 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@nxp.com>
---
drivers/usb/musb/musb_cppi41.c | 7 +++----
drivers/usb/musb/tusb6010_omap.c | 3 +--
drivers/usb/musb/ux500_dma.c | 3 +--
drivers/usb/renesas_usbhs/fifo.c | 3 +--
4 files changed, 6 insertions(+), 10 deletions(-)
diff --git a/drivers/usb/musb/musb_cppi41.c b/drivers/usb/musb/musb_cppi41.c
index 28e958fcc862c..dd77e7aba77ed 100644
--- a/drivers/usb/musb/musb_cppi41.c
+++ b/drivers/usb/musb/musb_cppi41.c
@@ -167,8 +167,8 @@ static void cppi41_trans_done(struct cppi41_dma_channel *cppi41_channel)
if (WARN_ON(!dma_desc))
return;
- dma_desc->callback_result = cppi41_dma_callback;
- dma_desc->callback_param = &cppi41_channel->channel;
+ dmaengine_desc_set_callback(dma_desc, NULL, cppi41_dma_callback,
+ &cppi41_channel->channel);
cppi41_channel->cookie = dma_desc->tx_submit(dma_desc);
trace_musb_cppi41_cont(cppi41_channel);
dma_async_issue_pending(dc);
@@ -467,8 +467,7 @@ static bool cppi41_configure_channel(struct dma_channel *channel,
if (!dma_desc)
return false;
- dma_desc->callback_result = cppi41_dma_callback;
- dma_desc->callback_param = channel;
+ dmaengine_desc_set_callback(dma_desc, NULL, cppi41_dma_callback, channel);
cppi41_channel->cookie = dma_desc->tx_submit(dma_desc);
cppi41_channel->channel.rx_packet_done = false;
diff --git a/drivers/usb/musb/tusb6010_omap.c b/drivers/usb/musb/tusb6010_omap.c
index 36ee61a52e7e6..eba54d1a5931b 100644
--- a/drivers/usb/musb/tusb6010_omap.c
+++ b/drivers/usb/musb/tusb6010_omap.c
@@ -308,8 +308,7 @@ static int tusb_omap_dma_program(struct dma_channel *channel, u16 packet_sz,
return false;
}
- dma_desc->callback = tusb_omap_dma_cb;
- dma_desc->callback_param = channel;
+ dmaengine_desc_set_callback(dma_desc, tusb_omap_dma_cb, NULL, channel);
dmaengine_submit(dma_desc);
dev_dbg(musb->controller,
diff --git a/drivers/usb/musb/ux500_dma.c b/drivers/usb/musb/ux500_dma.c
index bbb4978c0cd5f..378fb57358b58 100644
--- a/drivers/usb/musb/ux500_dma.c
+++ b/drivers/usb/musb/ux500_dma.c
@@ -116,8 +116,7 @@ static bool ux500_configure_channel(struct dma_channel *channel,
if (!dma_desc)
return false;
- dma_desc->callback = ux500_dma_callback;
- dma_desc->callback_param = channel;
+ dmaengine_desc_set_callback(dma_desc, ux500_dma_callback, NULL, channel);
ux500_channel->cookie = dma_desc->tx_submit(dma_desc);
dma_async_issue_pending(dma_chan);
diff --git a/drivers/usb/renesas_usbhs/fifo.c b/drivers/usb/renesas_usbhs/fifo.c
index bac6f8fd0055e..8111d9b02c7ba 100644
--- a/drivers/usb/renesas_usbhs/fifo.c
+++ b/drivers/usb/renesas_usbhs/fifo.c
@@ -839,8 +839,7 @@ static void usbhsf_dma_xfer_preparing(struct usbhs_pkt *pkt)
if (!desc)
return;
- desc->callback_result = usbhsf_dma_complete;
- desc->callback_param = pkt;
+ dmaengine_desc_set_callback(desc, NULL, usbhsf_dma_complete, pkt);
cookie = dmaengine_submit(desc);
if (cookie < 0) {
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/1] usb: musb: use dmaengine_desc_set_callback()
2026-11-02 18:02 [PATCH 1/1] usb: musb: use dmaengine_desc_set_callback() Frank.Li
@ 2026-11-02 18:05 ` sashiko-bot
0 siblings, 0 replies; 2+ messages in thread
From: sashiko-bot @ 2026-11-02 18:05 UTC (permalink / raw)
To: Frank.Li,
open list:MUSB MULTIPOINT HIGH SPEED DUAL-ROLE CONTROLLER
> From: Frank Li <Frank.Li@nxp.com>
>
> Replace open-coded assignments to callback, callback_result, 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@nxp.com>
Sashiko has reviewed this patch and found no issues.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261102180300.3966399-1-Frank.Li@oss.nxp.com?part=1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-11-02 18:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-02 18:02 [PATCH 1/1] usb: musb: use dmaengine_desc_set_callback() Frank.Li
2026-11-02 18:05 ` sashiko-bot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.