diff options
author | Vineet Gupta <Vineet.Gupta1@synopsys.com> | 2015-07-09 10:13:18 +0200 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2015-08-13 14:28:33 +0200 |
commit | d3928d0946bf75dc6709a08b12839ecb889f2564 (patch) | |
tree | 5eb9ce4a5db10c5c450711c5596598a2c2110e1e /drivers/net/wireless/brcm80211/brcmfmac/sdio.c | |
parent | ath9k: match wait_for_completion_timeout return type (diff) | |
download | linux-d3928d0946bf75dc6709a08b12839ecb889f2564.tar.xz linux-d3928d0946bf75dc6709a08b12839ecb889f2564.zip |
brcmfmac: dhd_sdio.c: use existing atomic_or primitive
There's already a generic implementation so use that instead.
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/brcm80211/brcmfmac/sdio.c')
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmfmac/sdio.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/sdio.c b/drivers/net/wireless/brcm80211/brcmfmac/sdio.c index d36f5f3d931b..f990e3d0e696 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/sdio.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/sdio.c @@ -2564,15 +2564,6 @@ static inline void brcmf_sdio_clrintr(struct brcmf_sdio *bus) } } -static void atomic_orr(int val, atomic_t *v) -{ - int old_val; - - old_val = atomic_read(v); - while (atomic_cmpxchg(v, old_val, val | old_val) != old_val) - old_val = atomic_read(v); -} - static int brcmf_sdio_intr_rstatus(struct brcmf_sdio *bus) { struct brcmf_core *buscore; @@ -2595,7 +2586,7 @@ static int brcmf_sdio_intr_rstatus(struct brcmf_sdio *bus) if (val) { brcmf_sdiod_regwl(bus->sdiodev, addr, val, &ret); bus->sdcnt.f1regdata++; - atomic_orr(val, &bus->intstatus); + atomic_or(val, &bus->intstatus); } return ret; @@ -2712,7 +2703,7 @@ static void brcmf_sdio_dpc(struct brcmf_sdio *bus) /* Keep still-pending events for next scheduling */ if (intstatus) - atomic_orr(intstatus, &bus->intstatus); + atomic_or(intstatus, &bus->intstatus); brcmf_sdio_clrintr(bus); |