diff options
Diffstat (limited to 'include/asm-generic')
-rw-r--r-- | include/asm-generic/atomic.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/asm-generic/atomic.h b/include/asm-generic/atomic.h index 56d4d36e1531..1973ad2b13f4 100644 --- a/include/asm-generic/atomic.h +++ b/include/asm-generic/atomic.h | |||
@@ -126,7 +126,7 @@ ATOMIC_OP(or, |) | |||
126 | * Atomically reads the value of @v. | 126 | * Atomically reads the value of @v. |
127 | */ | 127 | */ |
128 | #ifndef atomic_read | 128 | #ifndef atomic_read |
129 | #define atomic_read(v) (*(volatile int *)&(v)->counter) | 129 | #define atomic_read(v) ACCESS_ONCE((v)->counter) |
130 | #endif | 130 | #endif |
131 | 131 | ||
132 | /** | 132 | /** |