iwlwifi: fix otp access init
authorReinette Chatre <reinette.chatre@intel.com>
Fri, 22 May 2009 21:37:55 +0000 (14:37 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 3 Jun 2009 18:05:09 +0000 (14:05 -0400)
Polling function returns positive time if polling was needed to
read value. This is still success.

Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
CC: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/iwlwifi/iwl-eeprom.c

index cefa501e59713ccc714373493f2e04836eef50d8..7d7554a2f341309d1e39d7ac80868cc9677e6fc1 100644 (file)
@@ -240,13 +240,11 @@ static int iwl_init_otp_access(struct iwl_priv *priv)
        if (ret < 0)
                IWL_ERR(priv, "Time out access OTP\n");
        else {
-               if (!ret) {
-                       iwl_set_bits_prph(priv, APMG_PS_CTRL_REG,
-                                         APMG_PS_CTRL_VAL_RESET_REQ);
-                       udelay(5);
-                       iwl_clear_bits_prph(priv, APMG_PS_CTRL_REG,
-                                           APMG_PS_CTRL_VAL_RESET_REQ);
-               }
+               iwl_set_bits_prph(priv, APMG_PS_CTRL_REG,
+                                 APMG_PS_CTRL_VAL_RESET_REQ);
+               udelay(5);
+               iwl_clear_bits_prph(priv, APMG_PS_CTRL_REG,
+                                   APMG_PS_CTRL_VAL_RESET_REQ);
        }
        return ret;
 }