summaryrefslogtreecommitdiffstats
path: root/arch/m32r/kernel/sys_m32r.c
diff options
context:
space:
mode:
authorDave Jones <davej@redhat.com>2005-11-29 21:48:34 +0100
committerDave Jones <davej@redhat.com>2005-11-29 21:48:34 +0100
commitbe37bdbce7ceaacf4f20c6cc759efbe75ebd1196 (patch)
treef1a42fb5a4a17eea41d47d2c002fa303009f5523 /arch/m32r/kernel/sys_m32r.c
parent[PATCH] Support 100 MHz frequency transitions (diff)
parentMerge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 (diff)
downloadlinux-be37bdbce7ceaacf4f20c6cc759efbe75ebd1196.tar.xz
linux-be37bdbce7ceaacf4f20c6cc759efbe75ebd1196.zip
Merge ../linus
Diffstat (limited to 'arch/m32r/kernel/sys_m32r.c')
-rw-r--r--arch/m32r/kernel/sys_m32r.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/arch/m32r/kernel/sys_m32r.c b/arch/m32r/kernel/sys_m32r.c
index e0500e12c5fb..fe55b28d3725 100644
--- a/arch/m32r/kernel/sys_m32r.c
+++ b/arch/m32r/kernel/sys_m32r.c
@@ -41,7 +41,8 @@ asmlinkage int sys_tas(int *addr)
return -EFAULT;
local_irq_save(flags);
oldval = *addr;
- *addr = 1;
+ if (!oldval)
+ *addr = 1;
local_irq_restore(flags);
return oldval;
}
@@ -59,7 +60,8 @@ asmlinkage int sys_tas(int *addr)
_raw_spin_lock(&tas_lock);
oldval = *addr;
- *addr = 1;
+ if (!oldval)
+ *addr = 1;
_raw_spin_unlock(&tas_lock);
return oldval;