From: Frank.Li@oss.nxp.com
To: Bin Liu <b-liu@ti.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Frank Li <Frank.Li@nxp.com>,
linux-usb@vger.kernel.org (open list:MUSB MULTIPOINT HIGH SPEED
DUAL-ROLE CONTROLLER), linux-kernel@vger.kernel.org (open list),
linux-omap@vger.kernel.org (open list:OMAP USB SUPPORT)
Cc: imx@lists.linux.dev, vkoul@kernel.org
Subject: [PATCH 1/1] usb: musb: use dmaengine_desc_set_callback()
Date: Mon, 2 Nov 2026 13:02:56 -0500 [thread overview]
Message-ID: <20261102180300.3966399-1-Frank.Li@oss.nxp.com> (raw)
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
next reply other threads:[~2026-11-02 18:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-02 18:02 Frank.Li [this message]
2026-11-20 14:15 ` Greg Kroah-Hartman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261102180300.3966399-1-Frank.Li@oss.nxp.com \
--to=frank.li@oss.nxp.com \
--cc=Frank.Li@nxp.com \
--cc=b-liu@ti.com \
--cc=gregkh@linuxfoundation.org \
--cc=imx@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=vkoul@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®