* [PATCH v2 1/1] usb: renesas_usbhs: use dmaengine_get_dma_device() instead of chan->device->dev
@ 2026-11-03 22:05 Frank.Li
0 siblings, 0 replies; only message in thread
From: Frank.Li @ 2026-11-03 22:05 UTC (permalink / raw)
To: Greg Kroah-Hartman, Frank Li, open list:USB SUBSYSTEM, open list
Cc: imx, vkoul
From: Frank Li <Frank.Li@nxp.com>
Replace direct dma_chan::device::dev access with the proper
dmaengine_get_dma_device() for consumer API.
chan->device->dev is not always the device used for DMA mapping.
Some DMA engines support per-channel IOMMU mappings, so different
channels may use different DMA devices. dmaengine_get_dma_device()
returns the correct device for each channel.
This also prepares for making the DMA engine provider data structures
private. DMA consumers should not access DMA engine internals directly.
Assisted-by: LLM
Signed-off-by: Frank Li <Frank.Li@nxp.com>
---
change in v2
- Update subject
- v1 https://lore.kernel.org/all/20260917205625.1299375-1-Frank.Li@oss.nxp.com/
---
drivers/usb/renesas_usbhs/fifo.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/usb/renesas_usbhs/fifo.c b/drivers/usb/renesas_usbhs/fifo.c
index bac6f8fd0055e..d6fa436112aba 100644
--- a/drivers/usb/renesas_usbhs/fifo.c
+++ b/drivers/usb/renesas_usbhs/fifo.c
@@ -810,7 +810,7 @@ static int __usbhsf_dma_map_ctrl(struct usbhs_pkt *pkt, int map)
struct usbhs_fifo *fifo = usbhs_pipe_to_fifo(pipe);
struct dma_chan *chan = usbhsf_dma_chan_get(fifo, pkt);
- return info->dma_map_ctrl(chan->device->dev, pkt, map);
+ return info->dma_map_ctrl(dmaengine_get_dma_device(chan), pkt, map);
}
static void usbhsf_dma_complete(void *arg,
--
2.43.0
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-11-03 22:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-03 22:05 [PATCH v2 1/1] usb: renesas_usbhs: use dmaengine_get_dma_device() instead of chan->device->dev 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®