summaryrefslogtreecommitdiff
path: root/include/asm-cris/semaphore-helper.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-cris/semaphore-helper.h')
-rw-r--r--include/asm-cris/semaphore-helper.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/include/asm-cris/semaphore-helper.h b/include/asm-cris/semaphore-helper.h
index a8e1e6cb7cd0..27bfeca1b981 100644
--- a/include/asm-cris/semaphore-helper.h
+++ b/include/asm-cris/semaphore-helper.h
@@ -30,8 +30,7 @@ static inline int waking_non_zero(struct semaphore *sem)
unsigned long flags;
int ret = 0;
- local_save_flags(flags);
- local_irq_disable();
+ local_irq_save(flags);
if (read(&sem->waking) > 0) {
dec(&sem->waking);
ret = 1;
@@ -46,8 +45,7 @@ static inline int waking_non_zero_interruptible(struct semaphore *sem,
int ret = 0;
unsigned long flags;
- local_save_flags(flags);
- local_irq_disable();
+ local_irq_save(flags);
if (read(&sem->waking) > 0) {
dec(&sem->waking);
ret = 1;
@@ -64,8 +62,7 @@ static inline int waking_non_zero_trylock(struct semaphore *sem)
int ret = 1;
unsigned long flags;
- local_save_flags(flags);
- local_irq_disable();
+ local_irq_save(flags);
if (read(&sem->waking) <= 0)
inc(&sem->count);
else {