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)
commit6509f3096263ca2714ec938439a832b302a3a65e
tree1b9ccb0b95178e4b93efa4faec7412bcd79c64ef
parent3ee5447e8cd9a65d08fbb49fa9767cbf7fef6d91
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: 54ebbfb16034 ("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