iwlwifi: remove TRANS_PM_OPS
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Sun, 17 Jan 2021 11:10:37 +0000 (13:10 +0200)
committerLuca Coelho <luciano.coelho@intel.com>
Fri, 5 Feb 2021 09:52:34 +0000 (11:52 +0200)
Those were needed for a slave bus that is not longer supported.
Remove code that is mainly useless stubs.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
Link: https://lore.kernel.org/r/iwlwifi.20210117130510.8f8a735f39dd.If5716eaae0df5e6295a2af927bf3ab0ee074f0a0@changeid
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/iwl-trans.h
drivers/net/wireless/intel/iwlwifi/mvm/d3.c
drivers/net/wireless/intel/iwlwifi/pcie/trans.c

index eb6430c69e67549f26ad3af8b9e9c1f6c59c1362..ee97e2df3a1d8250b46956cd4570b2ba2ac0da8d 100644 (file)
@@ -580,8 +580,6 @@ struct iwl_trans_ops {
                                   unsigned long *flags);
        void (*set_bits_mask)(struct iwl_trans *trans, u32 reg, u32 mask,
                              u32 value);
-       int  (*suspend)(struct iwl_trans *trans);
-       void (*resume)(struct iwl_trans *trans);
 
        struct iwl_trans_dump_data *(*dump_data)(struct iwl_trans *trans,
                                                 u32 dump_mask);
@@ -1075,20 +1073,6 @@ static inline int iwl_trans_d3_resume(struct iwl_trans *trans,
        return trans->ops->d3_resume(trans, status, test, reset);
 }
 
-static inline int iwl_trans_suspend(struct iwl_trans *trans)
-{
-       if (!trans->ops->suspend)
-               return 0;
-
-       return trans->ops->suspend(trans);
-}
-
-static inline void iwl_trans_resume(struct iwl_trans *trans)
-{
-       if (trans->ops->resume)
-               trans->ops->resume(trans);
-}
-
 static inline struct iwl_trans_dump_data *
 iwl_trans_dump_data(struct iwl_trans *trans, u32 dump_mask)
 {
index c025188fa9bc5017688f5fe7a097f37cda27dd5d..550755fb7c2f3d012b71d310529a0d49d58aef90 100644 (file)
@@ -1104,16 +1104,11 @@ int iwl_mvm_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan)
 {
        struct iwl_mvm *mvm = IWL_MAC80211_GET_MVM(hw);
        struct iwl_trans *trans = mvm->trans;
-       int ret;
 
        iwl_mvm_pause_tcm(mvm, true);
 
        iwl_fw_runtime_suspend(&mvm->fwrt);
 
-       ret = iwl_trans_suspend(trans);
-       if (ret)
-               return ret;
-
        trans->system_pm_mode = IWL_PLAT_PM_MODE_D3;
 
        return __iwl_mvm_suspend(hw, wowlan, false);
@@ -2171,8 +2166,6 @@ out:
 
 static int iwl_mvm_resume_d3(struct iwl_mvm *mvm)
 {
-       iwl_trans_resume(mvm->trans);
-
        return __iwl_mvm_resume(mvm, false);
 }
 
index 44e738e8537ef37e2cd554dcf59339d35bddab8f..9fd1e699292cf92d174de005645b2962c2d75224 100644 (file)
@@ -3308,17 +3308,6 @@ static void iwl_trans_pcie_sync_nmi(struct iwl_trans *trans)
        iwl_trans_sync_nmi_with_addr(trans, inta_addr, sw_err_bit);
 }
 
-#ifdef CONFIG_PM_SLEEP
-static int iwl_trans_pcie_suspend(struct iwl_trans *trans)
-{
-       return 0;
-}
-
-static void iwl_trans_pcie_resume(struct iwl_trans *trans)
-{
-}
-#endif /* CONFIG_PM_SLEEP */
-
 #define IWL_TRANS_COMMON_OPS                                           \
        .op_mode_leave = iwl_trans_pcie_op_mode_leave,                  \
        .write8 = iwl_trans_pcie_write8,                                \
@@ -3341,17 +3330,8 @@ static void iwl_trans_pcie_resume(struct iwl_trans *trans)
        .interrupts = iwl_trans_pci_interrupts,                         \
        .sync_nmi = iwl_trans_pcie_sync_nmi                             \
 
-#ifdef CONFIG_PM_SLEEP
-#define IWL_TRANS_PM_OPS                                               \
-       .suspend = iwl_trans_pcie_suspend,                              \
-       .resume = iwl_trans_pcie_resume,
-#else
-#define IWL_TRANS_PM_OPS
-#endif /* CONFIG_PM_SLEEP */
-
 static const struct iwl_trans_ops trans_ops_pcie = {
        IWL_TRANS_COMMON_OPS,
-       IWL_TRANS_PM_OPS
        .start_hw = iwl_trans_pcie_start_hw,
        .fw_alive = iwl_trans_pcie_fw_alive,
        .start_fw = iwl_trans_pcie_start_fw,
@@ -3378,7 +3358,6 @@ static const struct iwl_trans_ops trans_ops_pcie = {
 
 static const struct iwl_trans_ops trans_ops_pcie_gen2 = {
        IWL_TRANS_COMMON_OPS,
-       IWL_TRANS_PM_OPS
        .start_hw = iwl_trans_pcie_start_hw,
        .fw_alive = iwl_trans_pcie_gen2_fw_alive,
        .start_fw = iwl_trans_pcie_gen2_start_fw,