Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f4b208eb authored by Jiri Slaby's avatar Jiri Slaby Committed by Greg Kroah-Hartman
Browse files

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: default avatarJiri Slaby <jslaby@suse.cz>
Reported-by: default avatarToralf Foerster <toralf.foerster@gmx.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f678c440
Loading
Loading
Loading
Loading
+6 −6
Original line number Original line Diff line number Diff line
@@ -405,12 +405,6 @@ static int pty_common_install(struct tty_driver *driver, struct tty_struct *tty,
	return retval;
	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)
static void pty_cleanup(struct tty_struct *tty)
{
{
	tty_port_put(tty->port);
	tty_port_put(tty->port);
@@ -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 = {
static const struct tty_operations ptm_unix98_ops = {
	.lookup = ptm_unix98_lookup,
	.lookup = ptm_unix98_lookup,
	.install = pty_unix98_install,
	.install = pty_unix98_install,