summaryrefslogtreecommitdiffstats
path: root/arch/cris/include/asm/atomic.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/cris/include/asm/atomic.h')
-rw-r--r--arch/cris/include/asm/atomic.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/cris/include/asm/atomic.h b/arch/cris/include/asm/atomic.h
index 0033f9dfea24..279766a70664 100644
--- a/arch/cris/include/asm/atomic.h
+++ b/arch/cris/include/asm/atomic.h
@@ -17,7 +17,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))
/* These should be written in asm but we do it in C for now. */