[PATCH 1/1] PCI: replace chan->device->dev with dmaengine_get_provider_device()
From: Frank . Li
Date: Tue Nov 03 2026 - 16:32:49 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.
Assisted-by: LLM
Signed-off-by: Frank Li <Frank.Li@xxxxxxx>
---
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