From: Ben Cahill Date: Fri, 9 Oct 2009 20:20:27 +0000 (-0700) Subject: iwl3945: move iwl_power_initialize() X-Git-Tag: MMI-PSA29.97-13-9~25754^2~599^2~137 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=008a9e3e3c37abd7f56d2478fe92d5874de3630a;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git iwl3945: move iwl_power_initialize() iwl_power_initialize() initializes driver data (not device hardware), and does not need to execute more than once (when the driver initializes). Therefore, it does not belong in iwl3945_apm_init(), which initializes hardware, and may run more than once. Move it to iwl3945_pci_probe(), where it will run only once. This agrees with similar placement in iwl-agn.c's iwl_pci_probe(), although placement under "services" seemed more appropriate than under "mac80211". Signed-off-by: Ben Cahill Signed-off-by: Reinette Chatre Signed-off-by: John W. Linville --- diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.c b/drivers/net/wireless/iwlwifi/iwl-3945.c index f8ce96c94c6b..4e15a8e20d09 100644 --- a/drivers/net/wireless/iwlwifi/iwl-3945.c +++ b/drivers/net/wireless/iwlwifi/iwl-3945.c @@ -991,8 +991,6 @@ static int iwl3945_apm_init(struct iwl_priv *priv) { int ret; - iwl_power_initialize(priv); - /* Configure chip clock phase-lock-loop */ iwl_set_bit(priv, CSR_ANA_PLL_CFG, CSR39_ANA_PLL_CFG_VAL); diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c index 2406b73e9093..e0e566c932c5 100644 --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c @@ -4064,6 +4064,7 @@ static int iwl3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e &priv->bands[IEEE80211_BAND_2GHZ].channels[5]); iwl3945_setup_deferred_work(priv); iwl3945_setup_rx_handlers(priv); + iwl_power_initialize(priv); /********************************* * 8. Setup and Register mac80211