summaryrefslogtreecommitdiffstats
path: root/arch/arm26/kernel
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2006-03-26 01:37:14 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2006-03-26 08:56:55 -0800
commit14cc3e2b633bb64063698980974df4535368e98f (patch)
treed542c9db7376de199d640b8e34d5630460b217b5 /arch/arm26/kernel
parent353ab6e97b8f209dbecc9f650f1f84e3da2a7bb1 (diff)
downloadop-kernel-dev-14cc3e2b633bb64063698980974df4535368e98f.zip
op-kernel-dev-14cc3e2b633bb64063698980974df4535368e98f.tar.gz
[PATCH] sem2mutex: misc static one-file mutexes
Semaphore to mutex conversion. The conversion was generated via scripts, and the result was validated automatically via a script as well. Signed-off-by: Ingo Molnar <mingo@elte.hu> Cc: Dave Jones <davej@codemonkey.org.uk> Cc: Paul Mackerras <paulus@samba.org> Cc: Ralf Baechle <ralf@linux-mips.org> Cc: Jens Axboe <axboe@suse.de> Cc: Neil Brown <neilb@cse.unsw.edu.au> Acked-by: Alasdair G Kergon <agk@redhat.com> Cc: Greg KH <greg@kroah.com> Cc: Dominik Brodowski <linux@dominikbrodowski.net> Cc: Adam Belay <ambx1@neo.rr.com> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: "David S. Miller" <davem@davemloft.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/arm26/kernel')
-rw-r--r--arch/arm26/kernel/traps.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/arm26/kernel/traps.c b/arch/arm26/kernel/traps.c
index 5847ea5..a79de04 100644
--- a/arch/arm26/kernel/traps.c
+++ b/arch/arm26/kernel/traps.c
@@ -34,7 +34,7 @@
#include <asm/system.h>
#include <asm/uaccess.h>
#include <asm/unistd.h>
-#include <asm/semaphore.h>
+#include <linux/mutex.h>
#include "ptrace.h"
@@ -207,19 +207,19 @@ void die_if_kernel(const char *str, struct pt_regs *regs, int err)
die(str, regs, err);
}
-static DECLARE_MUTEX(undef_sem);
+static DEFINE_MUTEX(undef_mutex);
static int (*undef_hook)(struct pt_regs *);
int request_undef_hook(int (*fn)(struct pt_regs *))
{
int ret = -EBUSY;
- down(&undef_sem);
+ mutex_lock(&undef_mutex);
if (undef_hook == NULL) {
undef_hook = fn;
ret = 0;
}
- up(&undef_sem);
+ mutex_unlock(&undef_mutex);
return ret;
}
@@ -228,12 +228,12 @@ int release_undef_hook(int (*fn)(struct pt_regs *))
{
int ret = -EINVAL;
- down(&undef_sem);
+ mutex_lock(&undef_mutex);
if (undef_hook == fn) {
undef_hook = NULL;
ret = 0;
}
- up(&undef_sem);
+ mutex_unlock(&undef_mutex);
return ret;
}
OpenPOWER on IntegriCloud