aboutsummaryrefslogtreecommitdiffstats
path: root/arch/h8300/include/asm/atomic.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/h8300/include/asm/atomic.h')
-rw-r--r--arch/h8300/include/asm/atomic.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/arch/h8300/include/asm/atomic.h b/arch/h8300/include/asm/atomic.h
index e936804b7508..984221abb66d 100644
--- a/arch/h8300/include/asm/atomic.h
+++ b/arch/h8300/include/asm/atomic.h
@@ -18,7 +18,8 @@
18 18
19static __inline__ int atomic_add_return(int i, atomic_t *v) 19static __inline__ int atomic_add_return(int i, atomic_t *v)
20{ 20{
21 int ret,flags; 21 unsigned long flags;
22 int ret;
22 local_irq_save(flags); 23 local_irq_save(flags);
23 ret = v->counter += i; 24 ret = v->counter += i;
24 local_irq_restore(flags); 25 local_irq_restore(flags);
@@ -30,7 +31,8 @@ static __inline__ int atomic_add_return(int i, atomic_t *v)
30 31
31static __inline__ int atomic_sub_return(int i, atomic_t *v) 32static __inline__ int atomic_sub_return(int i, atomic_t *v)
32{ 33{
33 int ret,flags; 34 unsigned long flags;
35 int ret;
34 local_irq_save(flags); 36 local_irq_save(flags);
35 ret = v->counter -= i; 37 ret = v->counter -= i;
36 local_irq_restore(flags); 38 local_irq_restore(flags);
@@ -42,7 +44,8 @@ static __inline__ int atomic_sub_return(int i, atomic_t *v)
42 44
43static __inline__ int atomic_inc_return(atomic_t *v) 45static __inline__ int atomic_inc_return(atomic_t *v)
44{ 46{
45 int ret,flags; 47 unsigned long flags;
48 int ret;
46 local_irq_save(flags); 49 local_irq_save(flags);
47 v->counter++; 50 v->counter++;
48 ret = v->counter; 51 ret = v->counter;
@@ -64,7 +67,8 @@ static __inline__ int atomic_inc_return(atomic_t *v)
64 67
65static __inline__ int atomic_dec_return(atomic_t *v) 68static __inline__ int atomic_dec_return(atomic_t *v)
66{ 69{
67 int ret,flags; 70 unsigned long flags;
71 int ret;
68 local_irq_save(flags); 72 local_irq_save(flags);
69 --v->counter; 73 --v->counter;
70 ret = v->counter; 74 ret = v->counter;
@@ -76,7 +80,8 @@ static __inline__ int atomic_dec_return(atomic_t *v)
76 80
77static __inline__ int atomic_dec_and_test(atomic_t *v) 81static __inline__ int atomic_dec_and_test(atomic_t *v)
78{ 82{
79 int ret,flags; 83 unsigned long flags;
84 int ret;
80 local_irq_save(flags); 85 local_irq_save(flags);
81 --v->counter; 86 --v->counter;
82 ret = v->counter; 87 ret = v->counter;