aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/tty_ioctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/tty/tty_ioctl.c')
-rw-r--r--drivers/tty/tty_ioctl.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/tty/tty_ioctl.c b/drivers/tty/tty_ioctl.c
index 53f2442c6099..9314d93c1a20 100644
--- a/drivers/tty/tty_ioctl.c
+++ b/drivers/tty/tty_ioctl.c
@@ -19,6 +19,7 @@
19#include <linux/module.h> 19#include <linux/module.h>
20#include <linux/bitops.h> 20#include <linux/bitops.h>
21#include <linux/mutex.h> 21#include <linux/mutex.h>
22#include <linux/compat.h>
22 23
23#include <asm/io.h> 24#include <asm/io.h>
24#include <asm/uaccess.h> 25#include <asm/uaccess.h>
@@ -1179,3 +1180,19 @@ int n_tty_ioctl_helper(struct tty_struct *tty, struct file *file,
1179 } 1180 }
1180} 1181}
1181EXPORT_SYMBOL(n_tty_ioctl_helper); 1182EXPORT_SYMBOL(n_tty_ioctl_helper);
1183
1184#ifdef CONFIG_COMPAT
1185long n_tty_compat_ioctl_helper(struct tty_struct *tty, struct file *file,
1186 unsigned int cmd, unsigned long arg)
1187{
1188 switch (cmd) {
1189 case TIOCGLCKTRMIOS:
1190 case TIOCSLCKTRMIOS:
1191 return tty_mode_ioctl(tty, file, cmd, (unsigned long) compat_ptr(arg));
1192 default:
1193 return -ENOIOCTLCMD;
1194 }
1195}
1196EXPORT_SYMBOL(n_tty_compat_ioctl_helper);
1197#endif
1198