fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git] / arch / arm26 / kernel / traps.c
index 4110862..7a297db 100644 (file)
@@ -15,7 +15,6 @@
  */
 
 #include <linux/module.h>
-#include <linux/config.h>
 #include <linux/types.h>
 #include <linux/kernel.h>
 #include <linux/signal.h>
@@ -34,7 +33,7 @@
 #include <asm/system.h>
 #include <asm/uaccess.h>
 #include <asm/unistd.h>
-#include <asm/semaphore.h>
+#include <linux/mutex.h>
 
 #include "ptrace.h"
 
@@ -208,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;
 }
@@ -229,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;
 }