From e0e49278a83915b85fef65587c798dea5ea253e1 Mon Sep 17 00:00:00 2001 From: Ryan Hsu Date: Thu, 21 Jan 2016 16:21:17 -0800 Subject: [PATCH] qcacld-3.0: Fix hif_bus_prevent_linkdown compilation hif_bus_prevent_linkdown() calls to cnss_wlan_pm_control(), which is only defined when CONFIG_PCI_MSM is enabled, fix the conditional compilation. Also fix a typo of RUNTIME_PM to FEATURE_RUNTIME_PM. Change-Id: I9d4cd65ee0020ca1b41d026c3124317ce854ea92 CRs-fixed: 966771 --- core/hif/src/pcie/if_pci.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/core/hif/src/pcie/if_pci.c b/core/hif/src/pcie/if_pci.c index 84436256435f..dbba66c781ec 100644 --- a/core/hif/src/pcie/if_pci.c +++ b/core/hif/src/pcie/if_pci.c @@ -1675,9 +1675,7 @@ void hif_disable_bus(void *bdev) #define OL_ATH_PCI_PM_CONTROL 0x44 -#ifdef CONFIG_CNSS - -#ifdef RUNTIME_PM +#ifdef FEATURE_RUNTIME_PM /** * hif_runtime_prevent_linkdown() - prevent or allow a runtime pm from occuring * @scn: hif context @@ -1700,6 +1698,7 @@ static void hif_runtime_prevent_linkdown(struct ol_softc *scn, bool flag) } #endif +#if defined(CONFIG_CNSS) && defined(CONFIG_PCI_MSM) /** * hif_bus_prevent_linkdown(): allow or permit linkdown * @flag: true prevents linkdown, false allows @@ -1716,6 +1715,13 @@ void hif_bus_prevent_linkdown(struct ol_softc *scn, bool flag) hif_runtime_prevent_linkdown(scn, flag); cnss_wlan_pm_control(flag); } +#else +void hif_bus_prevent_linkdown(struct ol_softc *scn, bool flag) +{ + HIF_ERROR("wlan: %s pcie power collapse", + (flag ? "disable" : "enable")); + hif_runtime_prevent_linkdown(scn, flag); +} #endif /**