mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-26 08:51:13 +00:00
46 lines
1.2 KiB
Diff
46 lines
1.2 KiB
Diff
|
From: Vineet Gupta <Vineet.Gupta1@synopsys.com>
|
||
|
Date: Thu, 9 Jul 2015 13:43:18 +0530
|
||
|
Subject: [PATCH] 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>
|
||
|
---
|
||
|
|
||
|
--- 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(st
|
||
|
}
|
||
|
}
|
||
|
|
||
|
-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(struc
|
||
|
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_
|
||
|
|
||
|
/* Keep still-pending events for next scheduling */
|
||
|
if (intstatus)
|
||
|
- atomic_orr(intstatus, &bus->intstatus);
|
||
|
+ atomic_or(intstatus, &bus->intstatus);
|
||
|
|
||
|
brcmf_sdio_clrintr(bus);
|
||
|
|