aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/eeprom_4k.c
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2012-12-10 15:30:27 +0100
committerJohn W. Linville <linville@tuxdriver.com>2012-12-10 15:49:56 -0500
commit0e4b9f2f12e94686855605eda64ea534a95d77f2 (patch)
tree752ee51ab1bd44c4db76dc782a0625637fcd711b /drivers/net/wireless/ath/ath9k/eeprom_4k.c
parentath9k: add EEPROM offset to debug message (diff)
downloadlinux-dev-0e4b9f2f12e94686855605eda64ea534a95d77f2.tar.xz
linux-dev-0e4b9f2f12e94686855605eda64ea534a95d77f2.zip
ath9k: use 'struct ath_hw *' as the first argument for 'ath9k_hw_nvram_read'
The 'ath9k_hw_nvram_read' function takes a 'struct ath_common *' as its first argument. Almost each of its caller has a 'struct ath_hw *' parameter in their argument list, and that is dereferenced in order to get the 'struct ath_common' pointer. Change the first argument of 'ath9k_hw_nvram_read' to be a 'struct ath_hw *', and remove the dereference calls from the callers. Also change the type of the first argument of the ar9300_eeprom_read_{byte,word} functions. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/eeprom_4k.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/eeprom_4k.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/net/wireless/ath/ath9k/eeprom_4k.c b/drivers/net/wireless/ath/ath9k/eeprom_4k.c
index 17c843d37210..c2bfd748eed8 100644
--- a/drivers/net/wireless/ath/ath9k/eeprom_4k.c
+++ b/drivers/net/wireless/ath/ath9k/eeprom_4k.c
@@ -32,13 +32,11 @@ static int ath9k_hw_4k_get_eeprom_rev(struct ath_hw *ah)
static bool __ath9k_hw_4k_fill_eeprom(struct ath_hw *ah)
{
- struct ath_common *common = ath9k_hw_common(ah);
u16 *eep_data = (u16 *)&ah->eeprom.map4k;
int addr, eep_start_loc = 64;
for (addr = 0; addr < SIZE_EEPROM_4K; addr++) {
- if (!ath9k_hw_nvram_read(common, addr + eep_start_loc,
- eep_data))
+ if (!ath9k_hw_nvram_read(ah, addr + eep_start_loc, eep_data))
return false;
eep_data++;
}
@@ -194,7 +192,7 @@ static int ath9k_hw_4k_check_eeprom(struct ath_hw *ah)
if (!ath9k_hw_use_flash(ah)) {
- if (!ath9k_hw_nvram_read(common, AR5416_EEPROM_MAGIC_OFFSET,
+ if (!ath9k_hw_nvram_read(ah, AR5416_EEPROM_MAGIC_OFFSET,
&magic)) {
ath_err(common, "Reading Magic # failed\n");
return false;