diff options
author | Peter Hurley | 2016-01-09 21:13:50 -0800 |
---|---|---|
committer | Greg Kroah-Hartman | 2016-01-27 14:28:20 -0800 |
commit | c1e33af1ed552258405f2e5a72509af039c0441c (patch) | |
tree | a8b655742a18d3385038aec20f14005e0feebe2f | |
parent | 05de87ed9531dc19d87136c9204d251abebc60d3 (diff) |
pty: Remove pty_unix98_shutdown()
The tty core invokes the optional driver shutdown() just before
the optional driver remove() (shutdown() has access to the termios
and remove() does not). Because pty drivers must prevent the default
remove() action, the Unix98 pty drivers define a dummy remove() function.
Instead, release the slave index in the remove() method and delete the
optional shutdown() method.
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/tty/pty.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/tty/pty.c b/drivers/tty/pty.c index 7e885a226f88..be5020d567ae 100644 --- a/drivers/tty/pty.c +++ b/drivers/tty/pty.c @@ -656,20 +656,13 @@ static struct tty_struct *pts_unix98_lookup(struct tty_driver *driver, return tty; } -/* We have no need to install and remove our tty objects as devpts does all - the work for us */ - static int pty_unix98_install(struct tty_driver *driver, struct tty_struct *tty) { return pty_common_install(driver, tty, false); } -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) +static void pty_unix98_remove(struct tty_driver *driver, struct tty_struct *tty) { devpts_kill_index(tty->driver_data, tty->index); } @@ -687,7 +680,6 @@ static const struct tty_operations ptm_unix98_ops = { .unthrottle = pty_unthrottle, .ioctl = pty_unix98_ioctl, .resize = pty_resize, - .shutdown = pty_unix98_shutdown, .cleanup = pty_cleanup }; @@ -705,7 +697,6 @@ static const struct tty_operations pty_unix98_ops = { .set_termios = pty_set_termios, .start = pty_start, .stop = pty_stop, - .shutdown = pty_unix98_shutdown, .cleanup = pty_cleanup, }; |