summaryrefslogtreecommitdiffstats
path: root/arch/avr32/include/asm/atomic.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/avr32/include/asm/atomic.h')
-rw-r--r--arch/avr32/include/asm/atomic.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/avr32/include/asm/atomic.h b/arch/avr32/include/asm/atomic.h
index 83e980a..2d07ce1 100644
--- a/arch/avr32/include/asm/atomic.h
+++ b/arch/avr32/include/asm/atomic.h
@@ -19,7 +19,7 @@
#define ATOMIC_INIT(i) { (i) }
-#define atomic_read(v) (*(volatile int *)&(v)->counter)
+#define atomic_read(v) ACCESS_ONCE((v)->counter)
#define atomic_set(v, i) (((v)->counter) = i)
#define ATOMIC_OP_RETURN(op, asm_op, asm_con) \
OpenPOWER on IntegriCloud