Skip to content

Commit

Permalink
TTY: pty, fix compilation warning
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jiri Slaby authored and Greg Kroah-Hartman committed Apr 15, 2013
1 parent f678c44 commit f4b208e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions drivers/tty/pty.c
Original file line number Diff line number Diff line change
Expand Up @@ -405,12 +405,6 @@ static int pty_common_install(struct tty_driver *driver, struct tty_struct *tty,
return retval;
}

/* this is called once with whichever end is closed last */
static void pty_unix98_shutdown(struct tty_struct *tty)
{
devpts_kill_index(tty->driver_data, tty->index);
}

static void pty_cleanup(struct tty_struct *tty)
{
tty_port_put(tty->port);
Expand Down Expand Up @@ -626,6 +620,12 @@ static void pty_unix98_remove(struct tty_driver *driver, struct tty_struct *tty)
{
}

/* this is called once with whichever end is closed last */
static void pty_unix98_shutdown(struct tty_struct *tty)
{
devpts_kill_index(tty->driver_data, tty->index);
}

static const struct tty_operations ptm_unix98_ops = {
.lookup = ptm_unix98_lookup,
.install = pty_unix98_install,
Expand Down

0 comments on commit f4b208e

Please sign in to comment.