Commit 0f75e00c authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Linus Torvalds

[PATCH] switch fs3270 to ->compat_ioctl

Again easy because all ioctls are compat clean.
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent bdff071d
...@@ -64,13 +64,6 @@ COMPATIBLE_IOCTL(BIODASDCMFENABLE) ...@@ -64,13 +64,6 @@ COMPATIBLE_IOCTL(BIODASDCMFENABLE)
COMPATIBLE_IOCTL(BIODASDCMFDISABLE) COMPATIBLE_IOCTL(BIODASDCMFDISABLE)
COMPATIBLE_IOCTL(BIODASDREADALLCMB) 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) COMPATIBLE_IOCTL(TAPE390_DISPLAY)
/* s390 doesn't need handlers here */ /* s390 doesn't need handlers here */
......
...@@ -319,9 +319,8 @@ fs3270_write(struct file *filp, const char *data, size_t count, loff_t *off) ...@@ -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 * process ioctl commands for the tube driver
*/ */
static int static long
fs3270_ioctl(struct inode *inode, struct file *filp, fs3270_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
unsigned int cmd, unsigned long arg)
{ {
struct fs3270 *fp; struct fs3270 *fp;
struct raw3270_iocb iocb; struct raw3270_iocb iocb;
...@@ -331,6 +330,7 @@ fs3270_ioctl(struct inode *inode, struct file *filp, ...@@ -331,6 +330,7 @@ fs3270_ioctl(struct inode *inode, struct file *filp,
if (!fp) if (!fp)
return -ENODEV; return -ENODEV;
rc = 0; rc = 0;
lock_kernel();
switch (cmd) { switch (cmd) {
case TUBICMD: case TUBICMD:
fp->read_command = arg; fp->read_command = arg;
...@@ -356,6 +356,7 @@ fs3270_ioctl(struct inode *inode, struct file *filp, ...@@ -356,6 +356,7 @@ fs3270_ioctl(struct inode *inode, struct file *filp,
rc = -EFAULT; rc = -EFAULT;
break; break;
} }
unlock_kernel();
return rc; return rc;
} }
...@@ -491,12 +492,13 @@ fs3270_close(struct inode *inode, struct file *filp) ...@@ -491,12 +492,13 @@ fs3270_close(struct inode *inode, struct file *filp)
} }
static struct file_operations fs3270_fops = { static struct file_operations fs3270_fops = {
.owner = THIS_MODULE, /* owner */ .owner = THIS_MODULE, /* owner */
.read = fs3270_read, /* read */ .read = fs3270_read, /* read */
.write = fs3270_write, /* write */ .write = fs3270_write, /* write */
.ioctl = fs3270_ioctl, /* ioctl */ .unlocked_ioctl = fs3270_ioctl, /* ioctl */
.open = fs3270_open, /* open */ .compat_ioctl = fs3270_ioctl, /* ioctl */
.release = fs3270_close, /* release */ .open = fs3270_open, /* open */
.release = fs3270_close, /* release */
}; };
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment