TTY ioctl() file parameter was dropped in kernel 2.6.39. stable-1.5
authorFlorian Pose <fp@igh-essen.com>
Tue, 12 Feb 2013 11:34:54 +0100
branchstable-1.5
changeset 2517 b5214d8e48d1
parent 2516 3680924f6f87
child 2518 e5640f5e10a2
TTY ioctl() file parameter was dropped in kernel 2.6.39.
tty/module.c
--- a/tty/module.c	Tue Feb 12 10:32:37 2013 +0100
+++ b/tty/module.c	Tue Feb 12 11:34:54 2013 +0100
@@ -523,15 +523,26 @@
 
 /*****************************************************************************/
 
-static int ec_tty_ioctl(struct tty_struct *tty, struct file *file,
+static int ec_tty_ioctl(struct tty_struct *tty,
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 39)
+        struct file *file,
+#endif
         unsigned int cmd, unsigned long arg)
 {
     ec_tty_t *t = (ec_tty_t *) tty->driver_data;
     int ret = -ENOTTY;
 
 #if EC_TTY_DEBUG >= 2
-    printk(KERN_INFO PFX "%s(tty=%p, file=%p, cmd=%08x, arg=%08lx).\n",
-            __func__, tty, file, cmd, arg);
+    printk(KERN_INFO PFX "%s(tty=%p, "
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 39)
+            "file=%p, "
+#endif
+            "cmd=%08x, arg=%08lx).\n",
+            __func__, tty,
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 39)
+            file,
+#endif
+            cmd, arg);
     printk(KERN_INFO PFX "decoded: type=%02x nr=%u\n",
             _IOC_TYPE(cmd), _IOC_NR(cmd));
 #endif