From 15d9d94d2e21180cc7a35e5d3a7d2e2b28bc5095 Mon Sep 17 00:00:00 2001 From: Shawn Lin Date: Tue, 7 Mar 2023 14:20:31 +0800 Subject: [PATCH] PCI: rockchip: Fix compile error without CONFIG_PCIEASPM drivers/pci/controller/dwc/pcie-dw-rockchip.c: In function 'rk_pcie_downstream_dev_to_d0': drivers/pci/controller/dwc/pcie-dw-rockchip.c:2207:38: error: 'struct pci_dev' has no member naned 'l1ss' Signed-off-by: Shawn Lin Change-Id: I67c0ed74183bc5bf7cb8975b8bcbcc4bebaa5ad5 --- drivers/pci/controller/dwc/pcie-dw-rockchip.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/pci/controller/dwc/pcie-dw-rockchip.c b/drivers/pci/controller/dwc/pcie-dw-rockchip.c index 696ce42b70a6..3d5860fd94b4 100644 --- a/drivers/pci/controller/dwc/pcie-dw-rockchip.c +++ b/drivers/pci/controller/dwc/pcie-dw-rockchip.c @@ -2185,6 +2185,7 @@ static int rk_pcie_probe(struct platform_device *pdev) return rk_pcie_really_probe(pdev); } +#ifdef CONFIG_PCIEASPM static void rk_pcie_downstream_dev_to_d0(struct rk_pcie *rk_pcie, bool enable) { struct pcie_port *pp = &rk_pcie->pci->pp; @@ -2248,6 +2249,7 @@ static void rk_pcie_downstream_dev_to_d0(struct rk_pcie *rk_pcie, bool enable) } } } +#endif static int __maybe_unused rockchip_dw_pcie_suspend(struct device *dev) { @@ -2431,6 +2433,7 @@ err: return ret; } +#ifdef CONFIG_PCIEASPM static int rockchip_dw_pcie_prepare(struct device *dev) { struct rk_pcie *rk_pcie = dev_get_drvdata(dev); @@ -2450,10 +2453,13 @@ static void rockchip_dw_pcie_complete(struct device *dev) rk_pcie_downstream_dev_to_d0(rk_pcie, true); dw_pcie_dbi_ro_wr_dis(rk_pcie->pci); } +#endif static const struct dev_pm_ops rockchip_dw_pcie_pm_ops = { +#ifdef CONFIG_PCIEASPM .prepare = rockchip_dw_pcie_prepare, .complete = rockchip_dw_pcie_complete, +#endif SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(rockchip_dw_pcie_suspend, rockchip_dw_pcie_resume) };