Kaynağa Gözat

qcacmn: Remove extra sleep_state_adjust dummy

Select the dummy implementation in the pci bus_ops assignment function
when MAX_PERF is selected.

Change-Id: I0a77e060dde2792959ae96bca86a4c073bb4cab0
CRs-Fixed: 986480
Houston Hoffman 9 yıl önce
ebeveyn
işleme
ca581c4ee3
2 değiştirilmiş dosya ile 9 ekleme ve 11 silme
  1. 9 2
      hif/src/dispatcher/multibus_pci.c
  2. 0 9
      hif/src/pcie/if_pci.c

+ 9 - 2
hif/src/dispatcher/multibus_pci.c

@@ -28,6 +28,8 @@
 #include "hif.h"
 #include "multibus.h"
 #include "pci_api.h"
+#include "hif_io32.h"
+#include "dummy.h"
 
 /**
  * hif_initialize_pci_ops() - initialize the pci ops
@@ -43,8 +45,13 @@ QDF_STATUS hif_initialize_pci_ops(struct hif_bus_ops *bus_ops)
 	bus_ops->hif_reset_soc = &hif_pci_reset_soc;
 	bus_ops->hif_bus_suspend = &hif_pci_bus_suspend;
 	bus_ops->hif_bus_resume = &hif_pci_bus_resume;
-	bus_ops->hif_target_sleep_state_adjust =
-		&hif_pci_target_sleep_state_adjust;
+
+	if (CONFIG_ATH_PCIE_MAX_PERF == 0)
+		bus_ops->hif_target_sleep_state_adjust =
+			&hif_pci_target_sleep_state_adjust;
+	else
+		bus_ops->hif_target_sleep_state_adjust =
+			&hif_dummy_target_sleep_state_adjust;
 
 	return QDF_STATUS_SUCCESS;
 }

+ 0 - 9
hif/src/pcie/if_pci.c

@@ -2869,7 +2869,6 @@ static int hif_log_soc_wakeup_timeout(struct hif_pci_softc *sc)
  *
  * Return: int
  */
-#if ((CONFIG_ATH_PCIE_MAX_PERF == 0) && CONFIG_ATH_PCIE_AWAKE_WHILE_DRIVER_LOAD)
 int hif_pci_target_sleep_state_adjust(struct hif_softc *scn,
 			      bool sleep_ok, bool wait_for_it)
 {
@@ -2984,14 +2983,6 @@ int hif_pci_target_sleep_state_adjust(struct hif_softc *scn,
 
 	return 0;
 }
-#else
-inline int
-hif_pci_sleep_state_adjust(struct hif_softc *scn,
-			      bool sleep_ok, bool wait_for_it)
-{
-	return 0;
-}
-#endif
 
 #ifdef CONFIG_ATH_PCIE_ACCESS_DEBUG
 uint32_t hif_target_read_checked(struct hif_softc *scn, uint32_t offset)