mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/1] PCI: replace chan->device->dev with dmaengine_get_provider_device()
@ 2026-11-03 21:29 Frank.Li
  0 siblings, 0 replies; only message in thread
From: Frank.Li @ 2026-11-03 21:29 UTC (permalink / raw)
  To: Manivannan Sadhasivam, Jeff Hugo, Krzysztof Wilczyński,
	Kishon Vijay Abraham I, Frank Li, Bjorn Helgaas, Niklas Cassel,
	Koichiro Den, Christian Bruel, Marco Crivellari, Andy Shevchenko,
	open list:MHI BUS, open list:MHI BUS,
	open list:PCI ENDPOINT SUBSYSTEM, open list
  Cc: imx, vkoul, Frank Li

From: Frank Li <Frank.Li@nxp.com>

Use the dmaengine_get_provider_device() API instead of directly
accessing chan->device->dev to get the DMA provider device.

No functional change. Prepare make to struct dma_device private to the DMA
engine.

Assisted-by: LLM
Signed-off-by: Frank Li <Frank.Li@nxp.com>
---
 drivers/pci/endpoint/functions/pci-epf-mhi.c  | 2 +-
 drivers/pci/endpoint/functions/pci-epf-test.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/pci/endpoint/functions/pci-epf-mhi.c b/drivers/pci/endpoint/functions/pci-epf-mhi.c
index 78f1fb1a6b0c7..5677fcbfe44f7 100644
--- a/drivers/pci/endpoint/functions/pci-epf-mhi.c
+++ b/drivers/pci/endpoint/functions/pci-epf-mhi.c
@@ -646,7 +646,7 @@ static bool pci_epf_mhi_filter(struct dma_chan *chan, void *node)
 	memset(&caps, 0, sizeof(caps));
 	dma_get_slave_caps(chan, &caps);
 
-	return chan->device->dev == filter->dev && filter->dma_mask &
+	return dmaengine_get_provider_device(chan) == filter->dev && filter->dma_mask &
 					caps.directions;
 }
 
diff --git a/drivers/pci/endpoint/functions/pci-epf-test.c b/drivers/pci/endpoint/functions/pci-epf-test.c
index d4905aa8e4c01..fd63e423c4726 100644
--- a/drivers/pci/endpoint/functions/pci-epf-test.c
+++ b/drivers/pci/endpoint/functions/pci-epf-test.c
@@ -238,7 +238,7 @@ static bool epf_dma_filter_fn(struct dma_chan *chan, void *node)
 	memset(&caps, 0, sizeof(caps));
 	dma_get_slave_caps(chan, &caps);
 
-	return chan->device->dev == filter->dev
+	return dmaengine_get_provider_device(chan) == filter->dev
 		&& (filter->dma_mask & caps.directions);
 }
 
-- 
2.43.0


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-11-03 21:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-03 21:29 [PATCH 1/1] PCI: replace chan->device->dev with dmaengine_get_provider_device() 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®