[PATCH v2 1/1] PCI: Replace chan->device->dev with dmaengine_get_provider_device()
From: Frank . Li
Date: Wed Nov 04 2026 - 10:07:55 EST
From: Frank Li <Frank.Li@xxxxxxx>
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.
Signed-off-by: Frank Li <Frank.Li@xxxxxxx>
---
Change in v2
- remove Assisted-by: LLM
- fix indention
---
drivers/pci/endpoint/functions/pci-epf-mhi.c | 4 ++--
drivers/pci/endpoint/functions/pci-epf-test.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/pci/endpoint/functions/pci-epf-mhi.c b/drivers/pci/endpoint/functions/pci-epf-mhi.c
index 78f1fb1a6b0c7..80b4622446fcf 100644
--- a/drivers/pci/endpoint/functions/pci-epf-mhi.c
+++ b/drivers/pci/endpoint/functions/pci-epf-mhi.c
@@ -646,8 +646,8 @@ 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 &
- caps.directions;
+ return dmaengine_get_provider_device(chan) == filter->dev &&
+ (filter->dma_mask & caps.directions);
}
static int pci_epf_mhi_dma_init(struct pci_epf_mhi *epf_mhi)
diff --git a/drivers/pci/endpoint/functions/pci-epf-test.c b/drivers/pci/endpoint/functions/pci-epf-test.c
index d4905aa8e4c01..ba2bc0c2f3f9c 100644
--- a/drivers/pci/endpoint/functions/pci-epf-test.c
+++ b/drivers/pci/endpoint/functions/pci-epf-test.c
@@ -238,8 +238,8 @@ 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
- && (filter->dma_mask & caps.directions);
+ return dmaengine_get_provider_device(chan) == filter->dev &&
+ (filter->dma_mask & caps.directions);
}
/**
--
2.43.0