Commit d3928d09 authored by Vineet Gupta's avatar Vineet Gupta Committed by Kalle Valo

brcmfmac: dhd_sdio.c: use existing atomic_or primitive

There's already a generic implementation so use that instead.
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent ab63cb8b
...@@ -2564,15 +2564,6 @@ static inline void brcmf_sdio_clrintr(struct brcmf_sdio *bus) ...@@ -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) static int brcmf_sdio_intr_rstatus(struct brcmf_sdio *bus)
{ {
struct brcmf_core *buscore; struct brcmf_core *buscore;
...@@ -2595,7 +2586,7 @@ static int brcmf_sdio_intr_rstatus(struct brcmf_sdio *bus) ...@@ -2595,7 +2586,7 @@ static int brcmf_sdio_intr_rstatus(struct brcmf_sdio *bus)
if (val) { if (val) {
brcmf_sdiod_regwl(bus->sdiodev, addr, val, &ret); brcmf_sdiod_regwl(bus->sdiodev, addr, val, &ret);
bus->sdcnt.f1regdata++; bus->sdcnt.f1regdata++;
atomic_orr(val, &bus->intstatus); atomic_or(val, &bus->intstatus);
} }
return ret; return ret;
...@@ -2712,7 +2703,7 @@ static void brcmf_sdio_dpc(struct brcmf_sdio *bus) ...@@ -2712,7 +2703,7 @@ static void brcmf_sdio_dpc(struct brcmf_sdio *bus)
/* Keep still-pending events for next scheduling */ /* Keep still-pending events for next scheduling */
if (intstatus) if (intstatus)
atomic_orr(intstatus, &bus->intstatus); atomic_or(intstatus, &bus->intstatus);
brcmf_sdio_clrintr(bus); brcmf_sdio_clrintr(bus);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment