diff options
author | Franky Lin <frankyl@broadcom.com> | 2012-05-04 18:27:28 -0700 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-05-15 17:27:55 -0400 |
commit | abb7fbb4a727f8bd446658a061a039674c907aec (patch) | |
tree | ad729bcc00dd873d751b5266d1de0e7dead14bc1 /drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c | |
parent | 8a90555fea9f2e1498a9efe4f25c32d2846f257f (diff) |
brcmfmac: remove unused parameter of brcmf_sdcard_reg_read
The size parameter for brcmf_sdcard_reg_read is always 4. Remove it
to make the code neat.
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c')
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c | 30 |
1 files changed, 8 insertions, 22 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c index 4add7da24681..9966cf25320a 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh.c @@ -222,7 +222,7 @@ brcmf_sdcard_set_sbaddr_window(struct brcmf_sdio_dev *sdiodev, u32 address) return err; } -u32 brcmf_sdcard_reg_read(struct brcmf_sdio_dev *sdiodev, u32 addr, uint size) +u32 brcmf_sdcard_reg_read(struct brcmf_sdio_dev *sdiodev, u32 addr) { int status; u32 word = 0; @@ -238,34 +238,20 @@ u32 brcmf_sdcard_reg_read(struct brcmf_sdio_dev *sdiodev, u32 addr, uint size) } addr &= SBSDIO_SB_OFT_ADDR_MASK; - if (size == 4) - addr |= SBSDIO_SB_ACCESS_2_4B_FLAG; + addr |= SBSDIO_SB_ACCESS_2_4B_FLAG; status = brcmf_sdioh_request_word(sdiodev, SDIOH_READ, SDIO_FUNC_1, - addr, &word, size); + addr, &word, 4); sdiodev->regfail = (status != 0); - brcmf_dbg(INFO, "u32data = 0x%x\n", word); - - /* if ok, return appropriately masked word */ if (status == 0) { - switch (size) { - case sizeof(u8): - return word & 0xff; - case sizeof(u16): - return word & 0xffff; - case sizeof(u32): - return word; - default: - sdiodev->regfail = true; - - } + brcmf_dbg(INFO, "data = 0x%x\n", word); + return word; + } else { + brcmf_dbg(ERROR, "failed %d at addr 0x%04x\n", status, addr); + return 0xFFFFFFFF; } - - /* otherwise, bad sdio access or invalid size */ - brcmf_dbg(ERROR, "error reading addr 0x%04x size %d\n", addr, size); - return 0xFFFFFFFF; } u32 brcmf_sdcard_reg_write(struct brcmf_sdio_dev *sdiodev, u32 addr, uint size, |