spear13xx_pcie_host_init() runs from the .init callback with the controller already enabled. Replace the capability search with dw_pcie_get_pcie_cap() and store the offset in a u8.
Signed-off-by: Hans Zhang <[email protected]> --- drivers/pci/controller/dwc/pcie-spear13xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/controller/dwc/pcie-spear13xx.c b/drivers/pci/controller/dwc/pcie-spear13xx.c index 01794a9d3ad2..6e4c11b497d4 100644 --- a/drivers/pci/controller/dwc/pcie-spear13xx.c +++ b/drivers/pci/controller/dwc/pcie-spear13xx.c @@ -122,7 +122,7 @@ static int spear13xx_pcie_host_init(struct dw_pcie_rp *pp) { struct dw_pcie *pci = to_dw_pcie_from_pp(pp); struct spear13xx_pcie *spear13xx_pcie = to_spear13xx_pcie(pci); - u32 exp_cap_off = dw_pcie_find_capability(pci, PCI_CAP_ID_EXP); + u8 exp_cap_off = dw_pcie_get_pcie_cap(pci); u32 val; spear13xx_pcie->app_base = pci->dbi_base + 0x2000; -- 2.43.0
