]> Pileus Git - ~andy/linux/commitdiff
iwlwifi: reverting 'misc wireless annotations' patch for iwlwifi
authorTomas Winkler <tomas.winkler@intel.com>
Wed, 13 Feb 2008 00:47:54 +0000 (02:47 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Fri, 15 Feb 2008 18:44:19 +0000 (13:44 -0500)
This patch revert commit blow that wrongly suppressed sparse warning in
iwlwifi eeprom reading
In addtion it suppresses correctly the iwlwifi eeprom register reading anomaly.

commit 45883ae47a0a4700c0f4716dc75a255cccdc3a76
misc wireless annotations
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/iwlwifi/iwl3945-base.c
drivers/net/wireless/iwlwifi/iwl4965-base.c

index 74b1099ff8aa27506aec01d3f97f0b6ad5832088..03a0756f7ef4ff341fb62381a15639f4a7d27371 100644 (file)
@@ -1586,7 +1586,7 @@ static inline int iwl3945_eeprom_acquire_semaphore(struct iwl3945_priv *priv)
  */
 int iwl3945_eeprom_init(struct iwl3945_priv *priv)
 {
-       __le16 *e = (__le16 *)&priv->eeprom;
+       u16 *e = (u16 *)&priv->eeprom;
        u32 gp = iwl3945_read32(priv, CSR_EEPROM_GP);
        u32 r;
        int sz = sizeof(priv->eeprom);
@@ -1629,7 +1629,7 @@ int iwl3945_eeprom_init(struct iwl3945_priv *priv)
                        IWL_ERROR("Time out reading EEPROM[%d]", addr);
                        return -ETIMEDOUT;
                }
-               e[addr / 2] = cpu_to_le16(r >> 16);
+               e[addr / 2] = le16_to_cpu((__force __le16)(r >> 16));
        }
 
        return 0;
index 14a11bd83e8262ac161a06ae861cae151708bb11..2c6756261856761d5d66d7e4acab797fe0cd21cd 100644 (file)
@@ -1659,7 +1659,7 @@ static inline void iwl4965_eeprom_release_semaphore(struct iwl4965_priv *priv)
  */
 int iwl4965_eeprom_init(struct iwl4965_priv *priv)
 {
-       __le16 *e = (__le16 *)&priv->eeprom;
+       u16 *e = (u16 *)&priv->eeprom;
        u32 gp = iwl4965_read32(priv, CSR_EEPROM_GP);
        u32 r;
        int sz = sizeof(priv->eeprom);
@@ -1703,7 +1703,7 @@ int iwl4965_eeprom_init(struct iwl4965_priv *priv)
                        rc = -ETIMEDOUT;
                        goto done;
                }
-               e[addr / 2] = cpu_to_le16(r >> 16);
+               e[addr / 2] = le16_to_cpu((__force __le16)(r >> 16));
        }
        rc = 0;