diff options
author | Kalle Valo <kvalo@qca.qualcomm.com> | 2013-09-01 11:01:53 +0400 |
---|---|---|
committer | Kalle Valo <kvalo@qca.qualcomm.com> | 2013-09-03 10:49:07 +0400 |
commit | e479ed437bb876c6f16e80a492223da2f449f221 (patch) | |
tree | deba7218cf62e4ed7a93ad7c6bee1cd497219dba /drivers/net/wireless/ath/ath10k/pci.h | |
parent | aa5c1db4451596be424f8df511aa5435a7d51e6c (diff) | |
download | linux-e479ed437bb876c6f16e80a492223da2f449f221.tar.xz |
ath10k: convert ath10k_pci_reg_read/write32() to take struct ath10k
This is consistent with all other functions.
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath10k/pci.h')
-rw-r--r-- | drivers/net/wireless/ath/ath10k/pci.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/net/wireless/ath/ath10k/pci.h b/drivers/net/wireless/ath/ath10k/pci.h index 2a6cb090b8b0..395f61021829 100644 --- a/drivers/net/wireless/ath/ath10k/pci.h +++ b/drivers/net/wireless/ath/ath10k/pci.h @@ -240,14 +240,18 @@ static inline struct ath10k_pci *ath10k_pci_priv(struct ath10k *ar) return ar->hif.priv; } -static inline u32 ath10k_pci_reg_read32(void __iomem *mem, u32 addr) +static inline u32 ath10k_pci_reg_read32(struct ath10k *ar, u32 addr) { - return ioread32(mem + PCIE_LOCAL_BASE_ADDRESS + addr); + struct ath10k_pci *ar_pci = ath10k_pci_priv(ar); + + return ioread32(ar_pci->mem + PCIE_LOCAL_BASE_ADDRESS + addr); } -static inline void ath10k_pci_reg_write32(void __iomem *mem, u32 addr, u32 val) +static inline void ath10k_pci_reg_write32(struct ath10k *ar, u32 addr, u32 val) { - iowrite32(val, mem + PCIE_LOCAL_BASE_ADDRESS + addr); + struct ath10k_pci *ar_pci = ath10k_pci_priv(ar); + + iowrite32(val, ar_pci->mem + PCIE_LOCAL_BASE_ADDRESS + addr); } #define ATH_PCI_RESET_WAIT_MAX 10 /* ms */ |