summaryrefslogtreecommitdiffstats
path: root/arch/arm26/kernel/traps.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm26/kernel/traps.c')
-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 5847ea5d774..a79de041b50 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;
}