iwlwifi: use meaningful vars in _iwl_poll_bit()
authorWu, Fengguang <fengguang.wu@intel.com>
Wed, 17 Dec 2008 08:52:32 +0000 (16:52 +0800)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 19 Dec 2008 20:23:39 +0000 (15:23 -0500)
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>
drivers/net/wireless/iwlwifi/iwl-io.h

index 998ac19716965244c4786dfb9da377fd469ee1b8..0a92e7431adaa023cc6a6916cdf454406c0ca6fc 100644 (file)
@@ -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)
 #endif
 
+#define IWL_POLL_INTERVAL 10   /* microseconds */
 static inline int _iwl_poll_bit(struct iwl_priv *priv, u32 addr,
                                u32 bits, u32 mask, int timeout)
 {
-       int i = 0;
+       int t = 0;
 
        do {
                if ((_iwl_read32(priv, addr) & mask) == (bits & mask))
-                       return i;
-               udelay(10);
-               i += 10;
-       } while (i < timeout);
+                       return t;
+               udelay(IWL_POLL_INTERVAL);
+               t += IWL_POLL_INTERVAL;
+       } while (t < timeout);
 
        return -ETIMEDOUT;
 }