]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/m32r/kernel/sys_m32r.c
m32r: use generic sys_pipe
[linux-2.6-omap-h63xx.git] / arch / m32r / kernel / sys_m32r.c
index b567351f3c5236d41e0b108a2ba516a86fc170fd..305ac852bbed417dda77de7a9b100c6a401bc75d 100644 (file)
@@ -10,8 +10,8 @@
 #include <linux/errno.h>
 #include <linux/sched.h>
 #include <linux/mm.h>
+#include <linux/fs.h>
 #include <linux/smp.h>
-#include <linux/smp_lock.h>
 #include <linux/sem.h>
 #include <linux/msg.h>
 #include <linux/shm.h>
 #include <linux/mman.h>
 #include <linux/file.h>
 #include <linux/utsname.h>
+#include <linux/ipc.h>
 
 #include <asm/uaccess.h>
 #include <asm/cachectl.h>
 #include <asm/cacheflush.h>
-#include <asm/ipc.h>
 #include <asm/syscall.h>
 #include <asm/unistd.h>
 
 /*
  * sys_tas() - test-and-set
  */
-asmlinkage int sys_tas(int *addr)
+asmlinkage int sys_tas(int __user *addr)
 {
        int oldval;
 
@@ -76,26 +76,6 @@ asmlinkage int sys_tas(int *addr)
        return oldval;
 }
 
-/*
- * sys_pipe() is the normal C calling standard for creating
- * a pipe. It's not the way Unix traditionally does this, though.
- */
-asmlinkage int
-sys_pipe(unsigned long r0, unsigned long r1, unsigned long r2,
-       unsigned long r3, unsigned long r4, unsigned long r5,
-       unsigned long r6, struct pt_regs regs)
-{
-       int fd[2];
-       int error;
-
-       error = do_pipe(fd);
-       if (!error) {
-               if (copy_to_user((void *)r0, (void *)fd, 2*sizeof(int)))
-                       error = -EFAULT;
-       }
-       return error;
-}
-
 asmlinkage long sys_mmap2(unsigned long addr, unsigned long len,
        unsigned long prot, unsigned long flags,
        unsigned long fd, unsigned long pgoff)
@@ -201,7 +181,7 @@ asmlinkage int sys_ipc(uint call, int first, int second,
        }
 }
 
-asmlinkage int sys_uname(struct old_utsname * name)
+asmlinkage int sys_uname(struct old_utsname __user * name)
 {
        int err;
        if (!name)
@@ -214,7 +194,7 @@ asmlinkage int sys_uname(struct old_utsname * name)
 
 asmlinkage int sys_cacheflush(void *addr, int bytes, int cache)
 {
-       /* This should flush more selectivly ...  */
+       /* This should flush more selectively ...  */
        _flush_cache_all();
        return 0;
 }