diff options
author | Jiri Slaby <jslaby@suse.cz> | 2013-04-15 01:52:05 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-04-15 14:02:54 -0400 |
commit | f4b208eb91776b0522b41c78fac6cf08134db78f (patch) | |
tree | ffd296c2bc5f49b2e9ef478b7d71d63b2a2ee3a4 /drivers/tty | |
parent | f678c440022eb6274840cd11edd52a5dcc7bf1b3 (diff) |
TTY: pty, fix compilation warning
When CONFIG_UNIX98_PTYS is unset, we see this warning in pty:
drivers/tty/pty.c:409:13: warning: ‘pty_unix98_shutdown’ defined but not used
Fix that by moving the function to a section which depends on that
config.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Reported-by: Toralf Foerster <toralf.foerster@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/pty.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/tty/pty.c b/drivers/tty/pty.c index 71e456aa6367..a62798fcc014 100644 --- a/drivers/tty/pty.c +++ b/drivers/tty/pty.c | |||
@@ -405,12 +405,6 @@ err: | |||
405 | return retval; | 405 | return retval; |
406 | } | 406 | } |
407 | 407 | ||
408 | /* this is called once with whichever end is closed last */ | ||
409 | static void pty_unix98_shutdown(struct tty_struct *tty) | ||
410 | { | ||
411 | devpts_kill_index(tty->driver_data, tty->index); | ||
412 | } | ||
413 | |||
414 | static void pty_cleanup(struct tty_struct *tty) | 408 | static void pty_cleanup(struct tty_struct *tty) |
415 | { | 409 | { |
416 | tty_port_put(tty->port); | 410 | tty_port_put(tty->port); |
@@ -626,6 +620,12 @@ static void pty_unix98_remove(struct tty_driver *driver, struct tty_struct *tty) | |||
626 | { | 620 | { |
627 | } | 621 | } |
628 | 622 | ||
623 | /* this is called once with whichever end is closed last */ | ||
624 | static void pty_unix98_shutdown(struct tty_struct *tty) | ||
625 | { | ||
626 | devpts_kill_index(tty->driver_data, tty->index); | ||
627 | } | ||
628 | |||
629 | static const struct tty_operations ptm_unix98_ops = { | 629 | static const struct tty_operations ptm_unix98_ops = { |
630 | .lookup = ptm_unix98_lookup, | 630 | .lookup = ptm_unix98_lookup, |
631 | .install = pty_unix98_install, | 631 | .install = pty_unix98_install, |