aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-io.h
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-io.h
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-io.h')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-io.h15
1 files changed, 3 insertions, 12 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-io.h b/drivers/net/wireless/iwlwifi/iwl-io.h
index a5c489af937a..c56dc215fef7 100644
--- a/drivers/net/wireless/iwlwifi/iwl-io.h
+++ b/drivers/net/wireless/iwlwifi/iwl-io.h
@@ -269,19 +269,10 @@ static inline void iwl_write_reg_buf(struct iwl_priv *priv,
269 } 269 }
270} 270}
271 271
272static inline int _iwl_poll_direct_bit(struct iwl_priv *priv, 272static inline int _iwl_poll_direct_bit(struct iwl_priv *priv, u32 addr,
273 u32 addr, u32 mask, int timeout) 273 u32 mask, int timeout)
274{ 274{
275 int i = 0; 275 return _iwl_poll_bit(priv, addr, mask, mask, timeout);
276
277 do {
278 if ((_iwl_read_direct32(priv, addr) & mask) == mask)
279 return i;
280 udelay(10);
281 i += 10;
282 } while (i < timeout);
283
284 return -ETIMEDOUT;
285} 276}
286 277
287#ifdef CONFIG_IWLWIFI_DEBUG 278#ifdef CONFIG_IWLWIFI_DEBUG