mm: thp: set the accessed flag for old pages on access fault
[pandora-kernel.git] / drivers / tty / tty_ioctl.c
index 53f2442..9314d93 100644 (file)
@@ -19,6 +19,7 @@
 #include <linux/module.h>
 #include <linux/bitops.h>
 #include <linux/mutex.h>
+#include <linux/compat.h>
 
 #include <asm/io.h>
 #include <asm/uaccess.h>
@@ -1179,3 +1180,19 @@ int n_tty_ioctl_helper(struct tty_struct *tty, struct file *file,
        }
 }
 EXPORT_SYMBOL(n_tty_ioctl_helper);
+
+#ifdef CONFIG_COMPAT
+long n_tty_compat_ioctl_helper(struct tty_struct *tty, struct file *file,
+                                       unsigned int cmd, unsigned long arg)
+{
+       switch (cmd) {
+       case TIOCGLCKTRMIOS:
+       case TIOCSLCKTRMIOS:
+               return tty_mode_ioctl(tty, file, cmd, (unsigned long) compat_ptr(arg));
+       default:
+               return -ENOIOCTLCMD;
+       }
+}
+EXPORT_SYMBOL(n_tty_compat_ioctl_helper);
+#endif
+