[PATCH] switch fs3270 to ->compat_ioctl
authorChristoph Hellwig <hch@lst.de>
Tue, 10 Jan 2006 04:52:04 +0000 (20:52 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Tue, 10 Jan 2006 16:01:31 +0000 (08:01 -0800)
Again easy because all ioctls are compat clean.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/s390/kernel/compat_ioctl.c
drivers/s390/char/fs3270.c

index 6504c4e69986783da98e0f27f26217587949dfe3..9cf8fd24cd21ef2c9cfe482ca7b8e20353514758 100644 (file)
@@ -64,13 +64,6 @@ COMPATIBLE_IOCTL(BIODASDCMFENABLE)
 COMPATIBLE_IOCTL(BIODASDCMFDISABLE)
 COMPATIBLE_IOCTL(BIODASDREADALLCMB)
 
-COMPATIBLE_IOCTL(TUBICMD)
-COMPATIBLE_IOCTL(TUBOCMD)
-COMPATIBLE_IOCTL(TUBGETI)
-COMPATIBLE_IOCTL(TUBGETO)
-COMPATIBLE_IOCTL(TUBSETMOD)
-COMPATIBLE_IOCTL(TUBGETMOD)
-
 COMPATIBLE_IOCTL(TAPE390_DISPLAY)
 
 /* s390 doesn't need handlers here */
index 735a7fcdeff51dd1616a0481a0ebaa68b57217bc..5f6fa4c67843e07f1e9b3f28281026792e093353 100644 (file)
@@ -319,9 +319,8 @@ fs3270_write(struct file *filp, const char *data, size_t count, loff_t *off)
 /*
  * process ioctl commands for the tube driver
  */
-static int
-fs3270_ioctl(struct inode *inode, struct file *filp,
-            unsigned int cmd, unsigned long arg)
+static long
+fs3270_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
 {
        struct fs3270 *fp;
        struct raw3270_iocb iocb;
@@ -331,6 +330,7 @@ fs3270_ioctl(struct inode *inode, struct file *filp,
        if (!fp)
                return -ENODEV;
        rc = 0;
+       lock_kernel();
        switch (cmd) {
        case TUBICMD:
                fp->read_command = arg;
@@ -356,6 +356,7 @@ fs3270_ioctl(struct inode *inode, struct file *filp,
                        rc = -EFAULT;
                break;
        }
+       unlock_kernel();
        return rc;
 }
 
@@ -491,12 +492,13 @@ fs3270_close(struct inode *inode, struct file *filp)
 }
 
 static struct file_operations fs3270_fops = {
-       .owner   = THIS_MODULE,         /* owner */
-       .read    = fs3270_read,         /* read */
-       .write   = fs3270_write,        /* write */
-       .ioctl   = fs3270_ioctl,        /* ioctl */
-       .open    = fs3270_open,         /* open */
-       .release = fs3270_close,        /* release */
+       .owner           = THIS_MODULE,         /* owner */
+       .read            = fs3270_read,         /* read */
+       .write           = fs3270_write,        /* write */
+       .unlocked_ioctl  = fs3270_ioctl,        /* ioctl */
+       .compat_ioctl    = fs3270_ioctl,        /* ioctl */
+       .open           = fs3270_open,          /* open */
+       .release        = fs3270_close,         /* release */
 };
 
 /*
This page took 0.028436 seconds and 5 git commands to generate.