fu740_pcie_start_link() is the .start_link callback. It runs after the
controller has been powered up, so replace the capability search with
dw_pcie_get_pcie_cap() to cache the offset.

Signed-off-by: Hans Zhang <[email protected]>
---
 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 6c7ce16031704..00ec69a091647 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 = dw_pcie_get_pcie_cap(pci);
        int ret;
        u32 orig, tmp;
 
-- 
2.43.0


Reply via email to