aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/pty.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/tty/pty.c')
-rw-r--r--drivers/tty/pty.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/tty/pty.c b/drivers/tty/pty.c
index c24b4db243b9..a62798fcc014 100644
--- a/drivers/tty/pty.c
+++ b/drivers/tty/pty.c
@@ -405,15 +405,8 @@ err:
405 return retval; 405 return retval;
406} 406}
407 407
408/* this is called once with whichever end is closed last */
409static void pty_unix98_shutdown(struct tty_struct *tty)
410{
411 devpts_kill_index(tty->driver_data, tty->index);
412}
413
414static void pty_cleanup(struct tty_struct *tty) 408static void pty_cleanup(struct tty_struct *tty)
415{ 409{
416 tty->port->itty = NULL;
417 tty_port_put(tty->port); 410 tty_port_put(tty->port);
418} 411}
419 412
@@ -627,6 +620,12 @@ static void pty_unix98_remove(struct tty_driver *driver, struct tty_struct *tty)
627{ 620{
628} 621}
629 622
623/* this is called once with whichever end is closed last */
624static void pty_unix98_shutdown(struct tty_struct *tty)
625{
626 devpts_kill_index(tty->driver_data, tty->index);
627}
628
630static const struct tty_operations ptm_unix98_ops = { 629static const struct tty_operations ptm_unix98_ops = {
631 .lookup = ptm_unix98_lookup, 630 .lookup = ptm_unix98_lookup,
632 .install = pty_unix98_install, 631 .install = pty_unix98_install,