]> git.baikalelectronics.ru Git - kernel.git/commit
tty: hide unused pty_get_peer function
authorArnd Bergmann <arnd@arndb.de>
Tue, 20 Jun 2017 20:34:13 +0000 (22:34 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 17 Jul 2017 15:04:41 +0000 (17:04 +0200)
commit9f2a0a9b6f99a0fdd22b68dcb37263f00c8f0b53
tree1b9ccb0b95178e4b93efa4faec7412bcd79c64ef
parentd1f280925b9963914b316b1df89f47f3ea4568e6
tty: hide unused pty_get_peer function

TIOCGPTPEER is only used for unix98 PTYs, and we get a warning
when those are disabled:

drivers/tty/pty.c:466:12: error: 'pty_get_peer' defined but not used [-Werror=unused-function]

This moves the respective functions inside of the existing #ifdef.

Fixes: 3468443a4086 ("tty: add TIOCGPTPEER ioctl")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Aleksa Sarai <asarai@suse.de>
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/pty.c