patch-2_6_7-vs1_9_1_12
[linux-2.6.git] / drivers / s390 / char / tape_char.c
index ccbe214..0d0343b 100644 (file)
@@ -18,6 +18,8 @@
 
 #include <asm/uaccess.h>
 
+#define TAPE_DBF_AREA  tape_core_dbf
+
 #include "tape.h"
 #include "tape_std.h"
 #include "tape_class.h"
@@ -29,8 +31,8 @@
 /*
  * file operation structure for tape character frontend
  */
-static ssize_t tapechar_read(struct file *, char *, size_t, loff_t *);
-static ssize_t tapechar_write(struct file *, const char *, size_t, loff_t *);
+static ssize_t tapechar_read(struct file *, char __user *, size_t, loff_t *);
+static ssize_t tapechar_write(struct file *, const char __user *, size_t, loff_t *);
 static int tapechar_open(struct inode *,struct file *);
 static int tapechar_release(struct inode *,struct file *);
 static int tapechar_ioctl(struct inode *, struct file *, unsigned int,
@@ -134,7 +136,7 @@ tapechar_check_idalbuffer(struct tape_device *device, size_t block_size)
  * Tape device read function
  */
 ssize_t
-tapechar_read (struct file *filp, char *data, size_t count, loff_t *ppos)
+tapechar_read(struct file *filp, char __user *data, size_t count, loff_t *ppos)
 {
        struct tape_device *device;
        struct tape_request *request;
@@ -208,7 +210,7 @@ tapechar_read (struct file *filp, char *data, size_t count, loff_t *ppos)
  * Tape device write function
  */
 ssize_t
-tapechar_write(struct file *filp, const char *data, size_t count, loff_t *ppos)
+tapechar_write(struct file *filp, const char __user *data, size_t count, loff_t *ppos)
 {
        struct tape_device *device;
        struct tape_request *request;
@@ -389,7 +391,7 @@ tapechar_ioctl(struct inode *inp, struct file *filp,
        if (no == MTIOCTOP) {
                struct mtop op;
 
-               if (copy_from_user(&op, (char *) data, sizeof(op)) != 0)
+               if (copy_from_user(&op, (char __user *) data, sizeof(op)) != 0)
                        return -EFAULT;
                if (op.mt_count < 0)
                        return -EINVAL;
@@ -436,7 +438,7 @@ tapechar_ioctl(struct inode *inp, struct file *filp,
                if (rc < 0)
                        return rc;
                pos.mt_blkno = rc;
-               if (copy_to_user((char *) data, &pos, sizeof(pos)) != 0)
+               if (copy_to_user((char __user *) data, &pos, sizeof(pos)) != 0)
                        return -EFAULT;
                return 0;
        }
@@ -466,7 +468,7 @@ tapechar_ioctl(struct inode *inp, struct file *filp,
                        get.mt_blkno = rc;
                }
 
-               if (copy_to_user((char *) data, &get, sizeof(get)) != 0)
+               if (copy_to_user((char __user *) data, &get, sizeof(get)) != 0)
                        return -EFAULT;
 
                return 0;