This commit was manufactured by cvs2svn to create tag
[linux-2.6.git] / drivers / char / tipar.c
index 8cbf15b..5f821fe 100644 (file)
@@ -279,7 +279,7 @@ tipar_close(struct inode *inode, struct file *file)
 }
 
 static ssize_t
-tipar_write(struct file *file, const char *buf, size_t count, loff_t * ppos)
+tipar_write(struct file *file, const char __user *buf, size_t count, loff_t * ppos)
 {
        unsigned int minor = iminor(file->f_dentry->d_inode) - TIPAR_MINOR;
        ssize_t n;
@@ -306,7 +306,7 @@ tipar_write(struct file *file, const char *buf, size_t count, loff_t * ppos)
 }
 
 static ssize_t
-tipar_read(struct file *file, char *buf, size_t count, loff_t * ppos)
+tipar_read(struct file *file, char __user *buf, size_t count, loff_t * ppos)
 {
        int b = 0;
        unsigned int minor = iminor(file->f_dentry->d_inode) - TIPAR_MINOR;
@@ -328,7 +328,7 @@ tipar_read(struct file *file, char *buf, size_t count, loff_t * ppos)
                        retval = -ETIMEDOUT;
                        goto out;
                } else {
-                       if (put_user(b, ((unsigned char *) buf) + n)) {
+                       if (put_user(b, buf + n)) {
                                retval = -EFAULT;
                                break;
                        } else