aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWu, Fengguang <fengguang.wu@intel.com>2008-12-17 03:52:32 -0500
committerJohn W. Linville <linville@tuxdriver.com>2008-12-19 15:23:39 -0500
commit4087f6f68cdbd2845c7e54236bae1b058a7b827b (patch)
tree01ea6b3a3dbe30794650abfbaf09d708891b8844
parentfebf3370c63b4ea7fc1cedb9a73ac37e3cb21079 (diff)
iwlwifi: use meaningful vars in _iwl_poll_bit()
Rename vars in _iwl_poll_bit() to better reflect the truth. Signed-off-by: Wu Fengguang <fengguang.wu@intel.com> Signed-off-by: Zhu Yi <yi.zhu@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-io.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-io.h b/drivers/net/wireless/iwlwifi/iwl-io.h
index 998ac1971696..0a92e7431ada 100644
--- a/drivers/net/wireless/iwlwifi/iwl-io.h
+++ b/drivers/net/wireless/iwlwifi/iwl-io.h
@@ -87,17 +87,18 @@ static inline u32 __iwl_read32(char *f, u32 l, struct iwl_priv *priv, u32 ofs)
87#define iwl_read32(p, o) _iwl_read32(p, o) 87#define iwl_read32(p, o) _iwl_read32(p, o)
88#endif 88#endif
89 89
90#define IWL_POLL_INTERVAL 10 /* microseconds */
90static inline int _iwl_poll_bit(struct iwl_priv *priv, u32 addr, 91static inline int _iwl_poll_bit(struct iwl_priv *priv, u32 addr,
91 u32 bits, u32 mask, int timeout) 92 u32 bits, u32 mask, int timeout)
92{ 93{
93 int i = 0; 94 int t = 0;
94 95
95 do { 96 do {
96 if ((_iwl_read32(priv, addr) & mask) == (bits & mask)) 97 if ((_iwl_read32(priv, addr) & mask) == (bits & mask))
97 return i; 98 return t;
98 udelay(10); 99 udelay(IWL_POLL_INTERVAL);
99 i += 10; 100 t += IWL_POLL_INTERVAL;
100 } while (i < timeout); 101 } while (t < timeout);
101 102
102 return -ETIMEDOUT; 103 return -ETIMEDOUT;
103} 104}