]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/sparc64/kernel/sys_sparc.c
Merge branch 'sg' of git://git.kernel.dk/linux-2.6-block
[linux-2.6-omap-h63xx.git] / arch / sparc64 / kernel / sys_sparc.c
index a53d4abb4b49de1193b6a21d1d7e10a96c8eba51..560cb1edb1d0d97df195827d88bcf8322450a7a8 100644 (file)
@@ -19,7 +19,6 @@
 #include <linux/mman.h>
 #include <linux/utsname.h>
 #include <linux/smp.h>
-#include <linux/smp_lock.h>
 #include <linux/slab.h>
 #include <linux/syscalls.h>
 #include <linux/ipc.h>
@@ -27,7 +26,6 @@
 #include <linux/random.h>
 
 #include <asm/uaccess.h>
-#include <asm/ipc.h>
 #include <asm/utrap.h>
 #include <asm/perfctr.h>
 #include <asm/a.out.h>
@@ -437,7 +435,7 @@ out:
 asmlinkage long sys_ipc(unsigned int call, int first, unsigned long second,
                        unsigned long third, void __user *ptr, long fifth)
 {
-       int err;
+       long err;
 
        /* No need for backward compatibility. We can start fresh... */
        if (call <= SEMCTL) {
@@ -454,16 +452,9 @@ asmlinkage long sys_ipc(unsigned int call, int first, unsigned long second,
                        err = sys_semget(first, (int)second, (int)third);
                        goto out;
                case SEMCTL: {
-                       union semun fourth;
-                       err = -EINVAL;
-                       if (!ptr)
-                               goto out;
-                       err = -EFAULT;
-                       if (get_user(fourth.__pad,
-                                    (void __user * __user *) ptr))
-                               goto out;
-                       err = sys_semctl(first, (int)second | IPC_64,
-                                        (int)third, fourth);
+                       err = sys_semctl(first, third,
+                                        (int)second | IPC_64,
+                                        (union semun) ptr);
                        goto out;
                }
                default: