Add CONFIG_PCIE_DW_HOST check for suspend/resume to avoid build issue when CONFIG_PCIE_DW_HOST is not defined but CONFIG_PCIE_DW_EP defined. Only host support suspend/resume at i.MX chips. Reported-by: kernel test robot <lkp@xxxxxxxxx> Closes: https://lore.kernel.org/oe-kbuild-all/202501171751.YzEFidaE-lkp@xxxxxxxxx/ Signed-off-by: Frank Li <Frank.Li@xxxxxxx> --- drivers/pci/controller/dwc/pci-imx6.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c index 129604025252d..e9fdf35d24821 100644 --- a/drivers/pci/controller/dwc/pci-imx6.c +++ b/drivers/pci/controller/dwc/pci-imx6.c @@ -1390,7 +1390,8 @@ static int imx_pcie_suspend_noirq(struct device *dev) { struct imx_pcie *imx_pcie = dev_get_drvdata(dev); - if (!(imx_pcie->drvdata->flags & IMX_PCIE_FLAG_SUPPORTS_SUSPEND)) + if (!(imx_pcie->drvdata->flags & IMX_PCIE_FLAG_SUPPORTS_SUSPEND) || + !IS_ENABLED(CONFIG_PCIE_DW_HOST)) return 0; imx_pcie_msi_save_restore(imx_pcie, true); @@ -1414,7 +1415,8 @@ static int imx_pcie_resume_noirq(struct device *dev) int ret; struct imx_pcie *imx_pcie = dev_get_drvdata(dev); - if (!(imx_pcie->drvdata->flags & IMX_PCIE_FLAG_SUPPORTS_SUSPEND)) + if (!(imx_pcie->drvdata->flags & IMX_PCIE_FLAG_SUPPORTS_SUSPEND) || + !IS_ENABLED(CONFIG_PCIE_DW_HOST)) return 0; if (imx_check_flag(imx_pcie, IMX_PCIE_FLAG_BROKEN_SUSPEND)) { -- 2.34.1