aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi/iwl-eeprom.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2011-04-05 12:42:08 -0400
committerJohn W. Linville <linville@tuxdriver.com>2011-04-07 15:51:39 -0400
commite98a130259ed6f88bc2833fa525b10453c92c047 (patch)
tree067f8b8d3421e4e7e2fd5a31e089c3a3caaf4965 /drivers/net/wireless/iwlwifi/iwl-eeprom.c
parentbc255930639122d788d1b6ce10d3c01cc2946398 (diff)
iwlagn: remove hw_rev
The hw_rev variable is used only during init, so there's no need to keep it around. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl-eeprom.c')
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-eeprom.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl-eeprom.c b/drivers/net/wireless/iwlwifi/iwl-eeprom.c
index f70d87162e59..4f8c13e9850b 100644
--- a/drivers/net/wireless/iwlwifi/iwl-eeprom.c
+++ b/drivers/net/wireless/iwlwifi/iwl-eeprom.c
@@ -188,13 +188,13 @@ static void iwl_set_otp_access(struct iwl_priv *priv, enum iwl_access_mode mode)
188 CSR_OTP_GP_REG_OTP_ACCESS_MODE); 188 CSR_OTP_GP_REG_OTP_ACCESS_MODE);
189} 189}
190 190
191static int iwlcore_get_nvm_type(struct iwl_priv *priv) 191static int iwlcore_get_nvm_type(struct iwl_priv *priv, u32 hw_rev)
192{ 192{
193 u32 otpgp; 193 u32 otpgp;
194 int nvm_type; 194 int nvm_type;
195 195
196 /* OTP only valid for CP/PP and after */ 196 /* OTP only valid for CP/PP and after */
197 switch (priv->hw_rev & CSR_HW_REV_TYPE_MSK) { 197 switch (hw_rev & CSR_HW_REV_TYPE_MSK) {
198 case CSR_HW_REV_TYPE_NONE: 198 case CSR_HW_REV_TYPE_NONE:
199 IWL_ERR(priv, "Unknown hardware type\n"); 199 IWL_ERR(priv, "Unknown hardware type\n");
200 return -ENOENT; 200 return -ENOENT;
@@ -394,7 +394,7 @@ u16 iwl_eeprom_query16(const struct iwl_priv *priv, size_t offset)
394 * 394 *
395 * NOTE: This routine uses the non-debug IO access functions. 395 * NOTE: This routine uses the non-debug IO access functions.
396 */ 396 */
397int iwl_eeprom_init(struct iwl_priv *priv) 397int iwl_eeprom_init(struct iwl_priv *priv, u32 hw_rev)
398{ 398{
399 __le16 *e; 399 __le16 *e;
400 u32 gp = iwl_read32(priv, CSR_EEPROM_GP); 400 u32 gp = iwl_read32(priv, CSR_EEPROM_GP);
@@ -404,7 +404,7 @@ int iwl_eeprom_init(struct iwl_priv *priv)
404 u16 validblockaddr = 0; 404 u16 validblockaddr = 0;
405 u16 cache_addr = 0; 405 u16 cache_addr = 0;
406 406
407 priv->nvm_device_type = iwlcore_get_nvm_type(priv); 407 priv->nvm_device_type = iwlcore_get_nvm_type(priv, hw_rev);
408 if (priv->nvm_device_type == -ENOENT) 408 if (priv->nvm_device_type == -ENOENT)
409 return -ENOENT; 409 return -ENOENT;
410 /* allocate eeprom */ 410 /* allocate eeprom */