diff options
author | Dave Jones <davej@redhat.com> | 2005-11-29 21:48:34 +0100 |
---|---|---|
committer | Dave Jones <davej@redhat.com> | 2005-11-29 21:48:34 +0100 |
commit | be37bdbce7ceaacf4f20c6cc759efbe75ebd1196 (patch) | |
tree | f1a42fb5a4a17eea41d47d2c002fa303009f5523 /arch/m32r/kernel/sys_m32r.c | |
parent | [PATCH] Support 100 MHz frequency transitions (diff) | |
parent | Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 (diff) | |
download | linux-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.c | 6 |
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; |