diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2012-12-10 09:30:25 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-12-10 15:49:54 -0500 |
commit | 2fd2cdfb6d2f3c3d18f2e47f41679a7bde9bcbf3 (patch) | |
tree | 1a0bf2637383c55b616de415f227d24660108ae1 /drivers | |
parent | b7c0c238898d200e80487516e2b67aba2a522cc0 (diff) |
ath9k: move duplicated debug message to 'ath9k_hw_nvram_read'
The fill_eeprom functions are printing the same
debug message in case the 'ath9k_hw_nvram_read'
function fails. Remove the duplicated code from
fill_eeprom functions and add the ath_dbg call
directly into 'ath9k_hw_nvram_read'.
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/eeprom.c | 8 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/eeprom_4k.c | 6 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/eeprom_9287.c | 5 | ||||
-rw-r--r-- | drivers/net/wireless/ath/ath9k/eeprom_def.c | 5 |
4 files changed, 11 insertions, 13 deletions
diff --git a/drivers/net/wireless/ath/ath9k/eeprom.c b/drivers/net/wireless/ath/ath9k/eeprom.c index 0512397a293c..4b6a9350adcf 100644 --- a/drivers/net/wireless/ath/ath9k/eeprom.c +++ b/drivers/net/wireless/ath/ath9k/eeprom.c | |||
@@ -115,7 +115,13 @@ void ath9k_hw_usb_gen_fill_eeprom(struct ath_hw *ah, u16 *eep_data, | |||
115 | 115 | ||
116 | bool ath9k_hw_nvram_read(struct ath_common *common, u32 off, u16 *data) | 116 | bool ath9k_hw_nvram_read(struct ath_common *common, u32 off, u16 *data) |
117 | { | 117 | { |
118 | return common->bus_ops->eeprom_read(common, off, data); | 118 | bool ret; |
119 | |||
120 | ret = common->bus_ops->eeprom_read(common, off, data); | ||
121 | if (!ret) | ||
122 | ath_dbg(common, EEPROM, "Unable to read eeprom region\n"); | ||
123 | |||
124 | return ret; | ||
119 | } | 125 | } |
120 | 126 | ||
121 | void ath9k_hw_fill_vpd_table(u8 pwrMin, u8 pwrMax, u8 *pPwrList, | 127 | void ath9k_hw_fill_vpd_table(u8 pwrMin, u8 pwrMax, u8 *pPwrList, |
diff --git a/drivers/net/wireless/ath/ath9k/eeprom_4k.c b/drivers/net/wireless/ath/ath9k/eeprom_4k.c index 7d075105a85d..17c843d37210 100644 --- a/drivers/net/wireless/ath/ath9k/eeprom_4k.c +++ b/drivers/net/wireless/ath/ath9k/eeprom_4k.c | |||
@@ -37,11 +37,9 @@ static bool __ath9k_hw_4k_fill_eeprom(struct ath_hw *ah) | |||
37 | int addr, eep_start_loc = 64; | 37 | int addr, eep_start_loc = 64; |
38 | 38 | ||
39 | for (addr = 0; addr < SIZE_EEPROM_4K; addr++) { | 39 | for (addr = 0; addr < SIZE_EEPROM_4K; addr++) { |
40 | if (!ath9k_hw_nvram_read(common, addr + eep_start_loc, eep_data)) { | 40 | if (!ath9k_hw_nvram_read(common, addr + eep_start_loc, |
41 | ath_dbg(common, EEPROM, | 41 | eep_data)) |
42 | "Unable to read eeprom region\n"); | ||
43 | return false; | 42 | return false; |
44 | } | ||
45 | eep_data++; | 43 | eep_data++; |
46 | } | 44 | } |
47 | 45 | ||
diff --git a/drivers/net/wireless/ath/ath9k/eeprom_9287.c b/drivers/net/wireless/ath/ath9k/eeprom_9287.c index cd742fb944c2..f2c32bc36f1c 100644 --- a/drivers/net/wireless/ath/ath9k/eeprom_9287.c +++ b/drivers/net/wireless/ath/ath9k/eeprom_9287.c | |||
@@ -40,11 +40,8 @@ static bool __ath9k_hw_ar9287_fill_eeprom(struct ath_hw *ah) | |||
40 | 40 | ||
41 | for (addr = 0; addr < SIZE_EEPROM_AR9287; addr++) { | 41 | for (addr = 0; addr < SIZE_EEPROM_AR9287; addr++) { |
42 | if (!ath9k_hw_nvram_read(common, addr + eep_start_loc, | 42 | if (!ath9k_hw_nvram_read(common, addr + eep_start_loc, |
43 | eep_data)) { | 43 | eep_data)) |
44 | ath_dbg(common, EEPROM, | ||
45 | "Unable to read eeprom region\n"); | ||
46 | return false; | 44 | return false; |
47 | } | ||
48 | eep_data++; | 45 | eep_data++; |
49 | } | 46 | } |
50 | 47 | ||
diff --git a/drivers/net/wireless/ath/ath9k/eeprom_def.c b/drivers/net/wireless/ath/ath9k/eeprom_def.c index a8ac30a00720..2654f741b8bf 100644 --- a/drivers/net/wireless/ath/ath9k/eeprom_def.c +++ b/drivers/net/wireless/ath/ath9k/eeprom_def.c | |||
@@ -97,11 +97,8 @@ static bool __ath9k_hw_def_fill_eeprom(struct ath_hw *ah) | |||
97 | 97 | ||
98 | for (addr = 0; addr < SIZE_EEPROM_DEF; addr++) { | 98 | for (addr = 0; addr < SIZE_EEPROM_DEF; addr++) { |
99 | if (!ath9k_hw_nvram_read(common, addr + ar5416_eep_start_loc, | 99 | if (!ath9k_hw_nvram_read(common, addr + ar5416_eep_start_loc, |
100 | eep_data)) { | 100 | eep_data)) |
101 | ath_err(ath9k_hw_common(ah), | ||
102 | "Unable to read eeprom region\n"); | ||
103 | return false; | 101 | return false; |
104 | } | ||
105 | eep_data++; | 102 | eep_data++; |
106 | } | 103 | } |
107 | return true; | 104 | return true; |