diff options
author | Roland Vossen <rvossen@broadcom.com> | 2011-09-22 17:07:39 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-09-26 16:55:29 -0700 |
commit | 33db085d1e243f6009b3a0220ad8826bebf90bfd (patch) | |
tree | d5b6bd05f271440373d65b7717729ae0c802ec8e /drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c | |
parent | 40fbb290119a94434a7fa952d0492f2325663f94 (diff) |
staging: brcm80211: various fulmac sparse endianness fixes
Reported-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Reviewed-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c')
-rw-r--r-- | drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c b/drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c index 443e3a8ce2ed..1cbdb80c023e 100644 --- a/drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c +++ b/drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c @@ -401,7 +401,9 @@ static int brcmf_sdioh_get_cisaddr(struct brcmf_sdio_dev *sdiodev, u32 regaddr) /* read 24 bits and return valid 17 bit addr */ int i; u32 scratch, regdata; - u8 *ptr = (u8 *)&scratch; + __le32 scratch_le; + u8 *ptr = (u8 *)&scratch_le; + for (i = 0; i < 3; i++) { if ((brcmf_sdioh_card_regread(sdiodev, 0, regaddr, 1, ®data)) != SUCCESS) @@ -412,7 +414,7 @@ static int brcmf_sdioh_get_cisaddr(struct brcmf_sdio_dev *sdiodev, u32 regaddr) } /* Only the lower 17-bits are valid */ - scratch = le32_to_cpu(scratch); + scratch = le32_to_cpu(scratch_le); scratch &= 0x0001FFFF; return scratch; } |