iwlwifi: remove apm_ops.stop
Since all devices share the same operation here, there's no need to call it indirectly. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
This commit is contained in:
parent
9597ebac91
commit
14e8e4afeb
@ -194,7 +194,6 @@ static struct iwl_lib_ops iwl1000_lib = {
|
|||||||
.update_chain_flags = iwl_update_chain_flags,
|
.update_chain_flags = iwl_update_chain_flags,
|
||||||
.apm_ops = {
|
.apm_ops = {
|
||||||
.init = iwl_apm_init,
|
.init = iwl_apm_init,
|
||||||
.stop = iwl_apm_stop,
|
|
||||||
.config = iwl1000_nic_config,
|
.config = iwl1000_nic_config,
|
||||||
},
|
},
|
||||||
.eeprom_ops = {
|
.eeprom_ops = {
|
||||||
|
@ -2704,7 +2704,6 @@ static struct iwl_lib_ops iwl3945_lib = {
|
|||||||
.dump_nic_error_log = iwl3945_dump_nic_error_log,
|
.dump_nic_error_log = iwl3945_dump_nic_error_log,
|
||||||
.apm_ops = {
|
.apm_ops = {
|
||||||
.init = iwl3945_apm_init,
|
.init = iwl3945_apm_init,
|
||||||
.stop = iwl_apm_stop,
|
|
||||||
.config = iwl3945_nic_config,
|
.config = iwl3945_nic_config,
|
||||||
},
|
},
|
||||||
.eeprom_ops = {
|
.eeprom_ops = {
|
||||||
|
@ -2266,7 +2266,6 @@ static struct iwl_lib_ops iwl4965_lib = {
|
|||||||
.set_channel_switch = iwl4965_hw_channel_switch,
|
.set_channel_switch = iwl4965_hw_channel_switch,
|
||||||
.apm_ops = {
|
.apm_ops = {
|
||||||
.init = iwl_apm_init,
|
.init = iwl_apm_init,
|
||||||
.stop = iwl_apm_stop,
|
|
||||||
.config = iwl4965_nic_config,
|
.config = iwl4965_nic_config,
|
||||||
},
|
},
|
||||||
.eeprom_ops = {
|
.eeprom_ops = {
|
||||||
|
@ -368,7 +368,6 @@ static struct iwl_lib_ops iwl5000_lib = {
|
|||||||
.set_channel_switch = iwl5000_hw_channel_switch,
|
.set_channel_switch = iwl5000_hw_channel_switch,
|
||||||
.apm_ops = {
|
.apm_ops = {
|
||||||
.init = iwl_apm_init,
|
.init = iwl_apm_init,
|
||||||
.stop = iwl_apm_stop,
|
|
||||||
.config = iwl5000_nic_config,
|
.config = iwl5000_nic_config,
|
||||||
},
|
},
|
||||||
.eeprom_ops = {
|
.eeprom_ops = {
|
||||||
@ -437,7 +436,6 @@ static struct iwl_lib_ops iwl5150_lib = {
|
|||||||
.set_channel_switch = iwl5000_hw_channel_switch,
|
.set_channel_switch = iwl5000_hw_channel_switch,
|
||||||
.apm_ops = {
|
.apm_ops = {
|
||||||
.init = iwl_apm_init,
|
.init = iwl_apm_init,
|
||||||
.stop = iwl_apm_stop,
|
|
||||||
.config = iwl5000_nic_config,
|
.config = iwl5000_nic_config,
|
||||||
},
|
},
|
||||||
.eeprom_ops = {
|
.eeprom_ops = {
|
||||||
|
@ -308,7 +308,6 @@ static struct iwl_lib_ops iwl6000_lib = {
|
|||||||
.set_channel_switch = iwl6000_hw_channel_switch,
|
.set_channel_switch = iwl6000_hw_channel_switch,
|
||||||
.apm_ops = {
|
.apm_ops = {
|
||||||
.init = iwl_apm_init,
|
.init = iwl_apm_init,
|
||||||
.stop = iwl_apm_stop,
|
|
||||||
.config = iwl6000_nic_config,
|
.config = iwl6000_nic_config,
|
||||||
},
|
},
|
||||||
.eeprom_ops = {
|
.eeprom_ops = {
|
||||||
@ -380,7 +379,6 @@ static struct iwl_lib_ops iwl6000g2b_lib = {
|
|||||||
.set_channel_switch = iwl6000_hw_channel_switch,
|
.set_channel_switch = iwl6000_hw_channel_switch,
|
||||||
.apm_ops = {
|
.apm_ops = {
|
||||||
.init = iwl_apm_init,
|
.init = iwl_apm_init,
|
||||||
.stop = iwl_apm_stop,
|
|
||||||
.config = iwl6000_nic_config,
|
.config = iwl6000_nic_config,
|
||||||
},
|
},
|
||||||
.eeprom_ops = {
|
.eeprom_ops = {
|
||||||
|
@ -2983,7 +2983,7 @@ static void __iwl_down(struct iwl_priv *priv)
|
|||||||
iwl_clear_bit(priv, CSR_GP_CNTRL, CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ);
|
iwl_clear_bit(priv, CSR_GP_CNTRL, CSR_GP_CNTRL_REG_FLAG_MAC_ACCESS_REQ);
|
||||||
|
|
||||||
/* Stop the device, and put it in low power state */
|
/* Stop the device, and put it in low power state */
|
||||||
priv->cfg->ops->lib->apm_ops.stop(priv);
|
iwl_apm_stop(priv);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
memset(&priv->card_alive, 0, sizeof(struct iwl_alive_resp));
|
memset(&priv->card_alive, 0, sizeof(struct iwl_alive_resp));
|
||||||
@ -4597,7 +4597,7 @@ static void __devexit iwl_pci_remove(struct pci_dev *pdev)
|
|||||||
* paths to avoid running iwl_down() at all before leaving driver.
|
* paths to avoid running iwl_down() at all before leaving driver.
|
||||||
* This (inexpensive) call *makes sure* device is reset.
|
* This (inexpensive) call *makes sure* device is reset.
|
||||||
*/
|
*/
|
||||||
priv->cfg->ops->lib->apm_ops.stop(priv);
|
iwl_apm_stop(priv);
|
||||||
|
|
||||||
iwl_tt_exit(priv);
|
iwl_tt_exit(priv);
|
||||||
|
|
||||||
|
@ -2599,7 +2599,7 @@ int iwl_pci_suspend(struct pci_dev *pdev, pm_message_t state)
|
|||||||
* it will not call apm_ops.stop() to stop the DMA operation.
|
* it will not call apm_ops.stop() to stop the DMA operation.
|
||||||
* Calling apm_ops.stop here to make sure we stop the DMA.
|
* Calling apm_ops.stop here to make sure we stop the DMA.
|
||||||
*/
|
*/
|
||||||
priv->cfg->ops->lib->apm_ops.stop(priv);
|
iwl_apm_stop(priv);
|
||||||
|
|
||||||
pci_save_state(pdev);
|
pci_save_state(pdev);
|
||||||
pci_disable_device(pdev);
|
pci_disable_device(pdev);
|
||||||
|
@ -117,7 +117,6 @@ struct iwl_hcmd_utils_ops {
|
|||||||
|
|
||||||
struct iwl_apm_ops {
|
struct iwl_apm_ops {
|
||||||
int (*init)(struct iwl_priv *priv);
|
int (*init)(struct iwl_priv *priv);
|
||||||
void (*stop)(struct iwl_priv *priv);
|
|
||||||
void (*config)(struct iwl_priv *priv);
|
void (*config)(struct iwl_priv *priv);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -603,7 +603,7 @@ int iwl_eeprom_init(struct iwl_priv *priv)
|
|||||||
if (ret)
|
if (ret)
|
||||||
iwl_eeprom_free(priv);
|
iwl_eeprom_free(priv);
|
||||||
/* Reset chip to save power until we load uCode during "up". */
|
/* Reset chip to save power until we load uCode during "up". */
|
||||||
priv->cfg->ops->lib->apm_ops.stop(priv);
|
iwl_apm_stop(priv);
|
||||||
alloc_err:
|
alloc_err:
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -2637,7 +2637,7 @@ static void __iwl3945_down(struct iwl_priv *priv)
|
|||||||
udelay(5);
|
udelay(5);
|
||||||
|
|
||||||
/* Stop the device, and put it in low power state */
|
/* Stop the device, and put it in low power state */
|
||||||
priv->cfg->ops->lib->apm_ops.stop(priv);
|
iwl_apm_stop(priv);
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
memset(&priv->card_alive, 0, sizeof(struct iwl_alive_resp));
|
memset(&priv->card_alive, 0, sizeof(struct iwl_alive_resp));
|
||||||
@ -4212,7 +4212,7 @@ static void __devexit iwl3945_pci_remove(struct pci_dev *pdev)
|
|||||||
* paths to avoid running iwl_down() at all before leaving driver.
|
* paths to avoid running iwl_down() at all before leaving driver.
|
||||||
* This (inexpensive) call *makes sure* device is reset.
|
* This (inexpensive) call *makes sure* device is reset.
|
||||||
*/
|
*/
|
||||||
priv->cfg->ops->lib->apm_ops.stop(priv);
|
iwl_apm_stop(priv);
|
||||||
|
|
||||||
/* make sure we flush any pending irq or
|
/* make sure we flush any pending irq or
|
||||||
* tasklet for the driver
|
* tasklet for the driver
|
||||||
|
Loading…
Reference in New Issue
Block a user