aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rtlwifi/rtl8188ee/hw.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2014-03-24 13:46:20 -0400
committerJohn W. Linville <linville@tuxdriver.com>2014-03-27 14:20:05 -0400
commit9cb76aa994682c7a5584cf4a03aeedd7ef1204bd (patch)
tree7733dfba8ae7e0f8ddd0ce024f119a9b8d6f9502 /drivers/net/wireless/rtlwifi/rtl8188ee/hw.c
parentfd6564fcdc0bfcd432e6e939f9538acc3905d08a (diff)
rtlwifi: Remove addressof casts to same type
Using addressof then casting to the original type is pointless, so remove these unnecessary casts. Done via coccinelle script: $ cat typecast.cocci @@ type T; T foo; @@ - (T *)&foo + &foo Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rtlwifi/rtl8188ee/hw.c')
-rw-r--r--drivers/net/wireless/rtlwifi/rtl8188ee/hw.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/net/wireless/rtlwifi/rtl8188ee/hw.c b/drivers/net/wireless/rtlwifi/rtl8188ee/hw.c
index bd2a26bafb69..5a30e4e551a9 100644
--- a/drivers/net/wireless/rtlwifi/rtl8188ee/hw.c
+++ b/drivers/net/wireless/rtlwifi/rtl8188ee/hw.c
@@ -1828,7 +1828,7 @@ static void _rtl88ee_read_adapter_info(struct ieee80211_hw *hw)
1828 RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD, 1828 RT_TRACE(rtlpriv, COMP_INIT, DBG_LOUD,
1829 "EEPROM SMID = 0x%4x\n", rtlefuse->eeprom_smid); 1829 "EEPROM SMID = 0x%4x\n", rtlefuse->eeprom_smid);
1830 /*customer ID*/ 1830 /*customer ID*/
1831 rtlefuse->eeprom_oemid = *(u8 *)&hwinfo[EEPROM_CUSTOMER_ID]; 1831 rtlefuse->eeprom_oemid = hwinfo[EEPROM_CUSTOMER_ID];
1832 if (rtlefuse->eeprom_oemid == 0xFF) 1832 if (rtlefuse->eeprom_oemid == 0xFF)
1833 rtlefuse->eeprom_oemid = 0; 1833 rtlefuse->eeprom_oemid = 0;
1834 1834
@@ -1845,7 +1845,7 @@ static void _rtl88ee_read_adapter_info(struct ieee80211_hw *hw)
1845 RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG, 1845 RT_TRACE(rtlpriv, COMP_INIT, DBG_DMESG,
1846 "dev_addr: %pM\n", rtlefuse->dev_addr); 1846 "dev_addr: %pM\n", rtlefuse->dev_addr);
1847 /*channel plan */ 1847 /*channel plan */
1848 rtlefuse->eeprom_channelplan = *(u8 *)&hwinfo[EEPROM_CHANNELPLAN]; 1848 rtlefuse->eeprom_channelplan = hwinfo[EEPROM_CHANNELPLAN];
1849 /* set channel paln to world wide 13 */ 1849 /* set channel paln to world wide 13 */
1850 rtlefuse->channel_plan = COUNTRY_CODE_WORLD_WIDE_13; 1850 rtlefuse->channel_plan = COUNTRY_CODE_WORLD_WIDE_13;
1851 /*tx power*/ 1851 /*tx power*/
@@ -1857,7 +1857,7 @@ static void _rtl88ee_read_adapter_info(struct ieee80211_hw *hw)
1857 rtlefuse->autoload_failflag, 1857 rtlefuse->autoload_failflag,
1858 hwinfo); 1858 hwinfo);
1859 /*board type*/ 1859 /*board type*/
1860 rtlefuse->board_type = (((*(u8 *)&hwinfo[jj]) & 0xE0) >> 5); 1860 rtlefuse->board_type = (hwinfo[jj] & 0xE0) >> 5;
1861 /*Wake on wlan*/ 1861 /*Wake on wlan*/
1862 rtlefuse->wowlan_enable = ((hwinfo[kk] & 0x40) >> 6); 1862 rtlefuse->wowlan_enable = ((hwinfo[kk] & 0x40) >> 6);
1863 /*parse xtal*/ 1863 /*parse xtal*/
@@ -2223,8 +2223,7 @@ void rtl88ee_update_channel_access_setting(struct ieee80211_hw *hw)
2223 struct rtl_mac *mac = rtl_mac(rtl_priv(hw)); 2223 struct rtl_mac *mac = rtl_mac(rtl_priv(hw));
2224 u16 sifs_timer; 2224 u16 sifs_timer;
2225 2225
2226 rtlpriv->cfg->ops->set_hw_reg(hw, HW_VAR_SLOT_TIME, 2226 rtlpriv->cfg->ops->set_hw_reg(hw, HW_VAR_SLOT_TIME, &mac->slot_time);
2227 (u8 *)&mac->slot_time);
2228 if (!mac->ht_enable) 2227 if (!mac->ht_enable)
2229 sifs_timer = 0x0a0a; 2228 sifs_timer = 0x0a0a;
2230 else 2229 else