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>
This commit is contained in:
Gabor Juhos
2012-12-10 15:30:25 +01:00
committed by John W. Linville
parent b7c0c23889
commit 2fd2cdfb6d
4 changed files with 11 additions and 13 deletions

View File

@@ -115,7 +115,13 @@ void ath9k_hw_usb_gen_fill_eeprom(struct ath_hw *ah, u16 *eep_data,
bool ath9k_hw_nvram_read(struct ath_common *common, u32 off, u16 *data)
{
return common->bus_ops->eeprom_read(common, off, data);
bool ret;
ret = common->bus_ops->eeprom_read(common, off, data);
if (!ret)
ath_dbg(common, EEPROM, "Unable to read eeprom region\n");
return ret;
}
void ath9k_hw_fill_vpd_table(u8 pwrMin, u8 pwrMax, u8 *pPwrList,