aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless
diff options
context:
space:
mode:
authorLuis R. Rodriguez <mcgrof@qca.qualcomm.com>2011-12-20 13:46:11 -0500
committerJohn W. Linville <linville@tuxdriver.com>2012-01-04 14:30:40 -0500
commita98aa7ae14529144527b64a54a9ecd828fa805a6 (patch)
treebb4b33aae04a2c2f141cfab9a4ef862a7c570b47 /drivers/net/wireless
parent76ff9a611d08d1fc03283c32cf16180e40cb6931 (diff)
ath9k_hw: fix sparse complaint on ar9003_switch_com_spdt_get()
This fixes this sparse complaint: make C=2 CF="-D__CHECK_ENDIAN__" M=drivers/net/wireless/ath/ CHECK drivers/net/wireless/ath/ath9k/ar9003_eeprom.c drivers/net/wireless/ath/ath9k/ar9003_eeprom.c:3544:21: warning: incorrect type in assignment (different base types) drivers/net/wireless/ath/ath9k/ar9003_eeprom.c:3544:21: expected restricted __le32 [usertype] val drivers/net/wireless/ath/ath9k/ar9003_eeprom.c:3544:21: got restricted __le16 [usertype] switchcomspdt drivers/net/wireless/ath/ath9k/ar9003_eeprom.c:3546:21: warning: incorrect type in assignment (different base types) drivers/net/wireless/ath/ath9k/ar9003_eeprom.c:3546:21: expected restricted __le32 [usertype] val drivers/net/wireless/ath/ath9k/ar9003_eeprom.c:3546:21: got restricted __le16 [usertype] switchcomspdt The eep->modalHeader5G.switchcomspdt is a le16 and we return u16, so just return le16_to_cpu(). Cc: Felix Fietkau <nbd@openwrt.org> Signed-off-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless')
-rw-r--r--drivers/net/wireless/ath/ath9k/ar9003_eeprom.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
index 391def99314c..9fbcbddea165 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
@@ -3538,13 +3538,13 @@ static void ar9003_hw_xpa_bias_level_apply(struct ath_hw *ah, bool is2ghz)
3538static u16 ar9003_switch_com_spdt_get(struct ath_hw *ah, bool is_2ghz) 3538static u16 ar9003_switch_com_spdt_get(struct ath_hw *ah, bool is_2ghz)
3539{ 3539{
3540 struct ar9300_eeprom *eep = &ah->eeprom.ar9300_eep; 3540 struct ar9300_eeprom *eep = &ah->eeprom.ar9300_eep;
3541 __le32 val; 3541 __le16 val;
3542 3542
3543 if (is_2ghz) 3543 if (is_2ghz)
3544 val = eep->modalHeader2G.switchcomspdt; 3544 val = eep->modalHeader2G.switchcomspdt;
3545 else 3545 else
3546 val = eep->modalHeader5G.switchcomspdt; 3546 val = eep->modalHeader5G.switchcomspdt;
3547 return le32_to_cpu(val); 3547 return le16_to_cpu(val);
3548} 3548}
3549 3549
3550 3550