Commit 4087f6f6 authored by Wu, Fengguang's avatar Wu, Fengguang Committed by John W. Linville

iwlwifi: use meaningful vars in _iwl_poll_bit()

Rename vars in _iwl_poll_bit() to better reflect the truth.
Signed-off-by: default avatarWu Fengguang <fengguang.wu@intel.com>
Signed-off-by: default avatarZhu Yi <yi.zhu@intel.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent febf3370
...@@ -87,17 +87,18 @@ static inline u32 __iwl_read32(char *f, u32 l, struct iwl_priv *priv, u32 ofs) ...@@ -87,17 +87,18 @@ static inline u32 __iwl_read32(char *f, u32 l, struct iwl_priv *priv, u32 ofs)
#define iwl_read32(p, o) _iwl_read32(p, o) #define iwl_read32(p, o) _iwl_read32(p, o)
#endif #endif
#define IWL_POLL_INTERVAL 10 /* microseconds */
static inline int _iwl_poll_bit(struct iwl_priv *priv, u32 addr, static inline int _iwl_poll_bit(struct iwl_priv *priv, u32 addr,
u32 bits, u32 mask, int timeout) u32 bits, u32 mask, int timeout)
{ {
int i = 0; int t = 0;
do { do {
if ((_iwl_read32(priv, addr) & mask) == (bits & mask)) if ((_iwl_read32(priv, addr) & mask) == (bits & mask))
return i; return t;
udelay(10); udelay(IWL_POLL_INTERVAL);
i += 10; t += IWL_POLL_INTERVAL;
} while (i < timeout); } while (t < timeout);
return -ETIMEDOUT; return -ETIMEDOUT;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment