aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-5000.c
diff options
context:
space:
mode:
authorZhu, Yi <yi.zhu@intel.com>2008-12-05 10:58:40 -0500
committerJohn W. Linville <linville@tuxdriver.com>2008-12-12 13:48:21 -0500
commit73d7b5acc461bdc99e0135779d15e1874c6e00a6 (patch)
tree30c62a728e57cc83f938a2a69a0188d624c42793 /drivers/net/wireless/iwlwifi/iwl-5000.c
parent42802d71dd14dd0e435a8da59d817d0c6f8a2866 (diff)
iwlwifi: iwl_poll_{direct_}bit cleanup
The patch merges implementation of iwl_poll_bit() and iwl_poll_direct_bit() by letting the latter be a special case of the former. Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-5000.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-5000.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c
index 438e4bd0a9a8..1b82742ea333 100644
--- a/drivers/net/wireless/iwlwifi/iwl-5000.c
+++ b/drivers/net/wireless/iwlwifi/iwl-5000.c
@@ -81,8 +81,7 @@ static int iwl5000_apm_stop_master(struct iwl_priv *priv)
81 /* set stop master bit */ 81 /* set stop master bit */
82 iwl_set_bit(priv, CSR_RESET, CSR_RESET_REG_FLAG_STOP_MASTER); 82 iwl_set_bit(priv, CSR_RESET, CSR_RESET_REG_FLAG_STOP_MASTER);
83 83
84 ret = iwl_poll_bit(priv, CSR_RESET, 84 ret = iwl_poll_direct_bit(priv, CSR_RESET,
85 CSR_RESET_REG_FLAG_MASTER_DISABLED,
86 CSR_RESET_REG_FLAG_MASTER_DISABLED, 100); 85 CSR_RESET_REG_FLAG_MASTER_DISABLED, 100);
87 if (ret < 0) 86 if (ret < 0)
88 goto out; 87 goto out;
@@ -120,9 +119,8 @@ static int iwl5000_apm_init(struct iwl_priv *priv)
120 iwl_set_bit(priv, CSR_GP_CNTRL, CSR_GP_CNTRL_REG_FLAG_INIT_DONE); 119 iwl_set_bit(priv, CSR_GP_CNTRL, CSR_GP_CNTRL_REG_FLAG_INIT_DONE);
121 120
122 /* wait for clock stabilization */ 121 /* wait for clock stabilization */
123 ret = iwl_poll_bit(priv, CSR_GP_CNTRL, 122 ret = iwl_poll_direct_bit(priv, CSR_GP_CNTRL,
124 CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY, 123 CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY, 25000);
125 CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY, 25000);
126 if (ret < 0) { 124 if (ret < 0) {
127 IWL_DEBUG_INFO("Failed to init the card\n"); 125 IWL_DEBUG_INFO("Failed to init the card\n");
128 return ret; 126 return ret;
@@ -189,9 +187,8 @@ static int iwl5000_apm_reset(struct iwl_priv *priv)
189 iwl_set_bit(priv, CSR_GP_CNTRL, CSR_GP_CNTRL_REG_FLAG_INIT_DONE); 187 iwl_set_bit(priv, CSR_GP_CNTRL, CSR_GP_CNTRL_REG_FLAG_INIT_DONE);
190 188
191 /* wait for clock stabilization */ 189 /* wait for clock stabilization */
192 ret = iwl_poll_bit(priv, CSR_GP_CNTRL, 190 ret = iwl_poll_direct_bit(priv, CSR_GP_CNTRL,
193 CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY, 191 CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY, 25000);
194 CSR_GP_CNTRL_REG_FLAG_MAC_CLOCK_READY, 25000);
195 if (ret < 0) { 192 if (ret < 0) {
196 IWL_DEBUG_INFO("Failed to init the card\n"); 193 IWL_DEBUG_INFO("Failed to init the card\n");
197 goto out; 194 goto out;