[PATCH v2 08/16] PCI: dwc: fu740: Use cached PCIe capability offset
From: Hans Zhang
Date: Sat May 30 2026 - 11:36:44 EST
This callback is invoked after dw_pcie_host_init() has cached the offset,
so we can use pci->pcie_cap directly.
Signed-off-by: Hans Zhang <18255117159@xxxxxxx>
---
In pcie-fu740, the call chain is:
static const struct dw_pcie_ops dw_pcie_ops = {
.start_link = fu740_pcie_start_link,
};
fu740_pcie_start_link()
-> dw_pcie_find_capability()
---
drivers/pci/controller/dwc/pcie-fu740.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/pci/controller/dwc/pcie-fu740.c b/drivers/pci/controller/dwc/pcie-fu740.c
index d0a34f680397..72c0a6316fff 100644
--- a/drivers/pci/controller/dwc/pcie-fu740.c
+++ b/drivers/pci/controller/dwc/pcie-fu740.c
@@ -178,7 +178,7 @@ static int fu740_pcie_start_link(struct dw_pcie *pci)
{
struct device *dev = pci->dev;
struct fu740_pcie *afp = dev_get_drvdata(dev);
- u8 cap_exp = dw_pcie_find_capability(pci, PCI_CAP_ID_EXP);
+ u8 cap_exp = pci->pcie_cap;
int ret;
u32 orig, tmp;
--
2.34.1