[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190814205521.122180-2-arnd@arndb.de>
Date: Wed, 14 Aug 2019 22:54:46 +0200
From: Arnd Bergmann <arnd@...db.de>
To: linux-kernel@...r.kernel.org, viro@...iv.linux.org.uk,
linux-fsdevel@...r.kernel.org,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Jiri Slaby <jslaby@...e.com>
Cc: Arnd Bergmann <arnd@...db.de>, Dmitry Safonov <dima@...sta.com>,
Johan Hovold <johan@...nel.org>
Subject: [PATCH v5 11/18] 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.
Signed-off-by: Arnd Bergmann <arnd@...db.de>
---
drivers/tty/tty_io.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c
index cee8b69c6f72..bf5241e0d772 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:
--
2.20.0
Powered by blists - more mailing lists