aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/tty_io.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2019-06-06 10:07:36 +0200
committerArnd Bergmann <arnd@arndb.de>2019-10-23 17:23:47 +0200
commitb7aff093e94daff1e6076393ed43b7c9651b2b43 (patch)
tree548436ece40fb6a44f7be0efc09df8e395a55a45 /drivers/tty/tty_io.c
parentcompat_ioctl: move SIOCOUTQ out of compat_ioctl.c (diff)
downloadlinux-dev-b7aff093e94daff1e6076393ed43b7c9651b2b43.tar.xz
linux-dev-b7aff093e94daff1e6076393ed43b7c9651b2b43.zip
tty: handle compat PPP ioctls
Multiple tty devices are have tty devices that handle the PPPIOCGUNIT and PPPIOCGCHAN ioctls. To avoid adding a compat_ioctl handler to each of those, add it directly in tty_compat_ioctl so we can remove the calls from fs/compat_ioctl.c. Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Paul Mackerras <paulus@samba.org> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'drivers/tty/tty_io.c')
-rw-r--r--drivers/tty/tty_io.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c
index c09691b20a25..a81807b394d1 100644
--- a/drivers/tty/tty_io.c
+++ b/drivers/tty/tty_io.c
@@ -87,6 +87,7 @@
#include <linux/string.h>
#include <linux/slab.h>
#include <linux/poll.h>
+#include <linux/ppp-ioctl.h>
#include <linux/proc_fs.h>
#include <linux/init.h>
#include <linux/module.h>
@@ -2811,6 +2812,9 @@ static long tty_compat_ioctl(struct file *file, unsigned int cmd,
#endif
case TIOCGSOFTCAR:
case TIOCSSOFTCAR:
+
+ case PPPIOCGCHAN:
+ case PPPIOCGUNIT:
return tty_ioctl(file, cmd, (unsigned long)compat_ptr(arg));
case TIOCCONS:
case TIOCEXCL: