public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 2/4] switch fs3270 to ->compat_ioctl
@ 2005-11-04 22:16 Christoph Hellwig
  0 siblings, 0 replies; only message in thread
From: Christoph Hellwig @ 2005-11-04 22:16 UTC (permalink / raw)
  To: akpm, schwidefsky; +Cc: linux-kernel

again easy because all ioctls are compat clean.


Index: linux-2.6/arch/s390/kernel/compat_ioctl.c
===================================================================
--- linux-2.6.orig/arch/s390/kernel/compat_ioctl.c	2005-11-02 11:12:17.000000000 +0100
+++ linux-2.6/arch/s390/kernel/compat_ioctl.c	2005-11-02 11:13:09.000000000 +0100
@@ -44,13 +44,6 @@
 #include "../../../fs/compat_ioctl.c"
 
 /* s390 only ioctls */
-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: linux-2.6/drivers/s390/char/fs3270.c
===================================================================
--- linux-2.6.orig/drivers/s390/char/fs3270.c	2005-11-02 11:12:16.000000000 +0100
+++ linux-2.6/drivers/s390/char/fs3270.c	2005-11-02 11:14:03.000000000 +0100
@@ -319,9 +319,8 @@
 /*
  * 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 @@
 	if (!fp)
 		return -ENODEV;
 	rc = 0;
+	lock_kernel();
 	switch (cmd) {
 	case TUBICMD:
 		fp->read_command = arg;
@@ -356,6 +356,7 @@
 			rc = -EFAULT;
 		break;
 	}
+	unlock_kernel();
 	return rc;
 }
 
@@ -491,12 +492,13 @@
 }
 
 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 */
 };
 
 /*

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-11-04 22:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-04 22:16 [PATCH 2/4] switch fs3270 to ->compat_ioctl Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox