diff options
author | Alan Cox <alan@linux.intel.com> | 2012-07-17 12:06:57 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-07-17 12:13:38 -0400 |
commit | 36b3c070d2346c890d690d71f6eab02f8c511137 (patch) | |
tree | 1a1345329e3827eec3cf0de70eac2b2f1d663b55 /drivers/tty/pty.c | |
parent | 3db1ddb725dcd9a2bb32be2b64d0688c3e1c4579 (diff) |
tty: Move the handling of the tty release logic
Now that we don't have tty->termios tied to drivers->tty we can untangle
the logic here. In addition we can push the removal logic out of the
destructor path.
At that point we can think about sorting out tty_port and console and all
the other ugly hangovers.
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/pty.c')
-rw-r--r-- | drivers/tty/pty.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/drivers/tty/pty.c b/drivers/tty/pty.c index 5ad7ccc49f74..60c08ce83782 100644 --- a/drivers/tty/pty.c +++ b/drivers/tty/pty.c | |||
@@ -527,12 +527,6 @@ static struct tty_struct *pts_unix98_lookup(struct tty_driver *driver, | |||
527 | return tty; | 527 | return tty; |
528 | } | 528 | } |
529 | 529 | ||
530 | static void pty_unix98_shutdown(struct tty_struct *tty) | ||
531 | { | ||
532 | tty_driver_remove_tty(tty->driver, tty); | ||
533 | /* We have our own method as we don't use the tty index */ | ||
534 | } | ||
535 | |||
536 | /* We have no need to install and remove our tty objects as devpts does all | 530 | /* We have no need to install and remove our tty objects as devpts does all |
537 | the work for us */ | 531 | the work for us */ |
538 | 532 | ||
@@ -558,9 +552,8 @@ static const struct tty_operations ptm_unix98_ops = { | |||
558 | .unthrottle = pty_unthrottle, | 552 | .unthrottle = pty_unthrottle, |
559 | .set_termios = pty_set_termios, | 553 | .set_termios = pty_set_termios, |
560 | .ioctl = pty_unix98_ioctl, | 554 | .ioctl = pty_unix98_ioctl, |
561 | .shutdown = pty_unix98_shutdown, | 555 | .resize = pty_resize, |
562 | .cleanup = pty_cleanup, | 556 | .cleanup = pty_cleanup |
563 | .resize = pty_resize | ||
564 | }; | 557 | }; |
565 | 558 | ||
566 | static const struct tty_operations pty_unix98_ops = { | 559 | static const struct tty_operations pty_unix98_ops = { |
@@ -575,7 +568,6 @@ static const struct tty_operations pty_unix98_ops = { | |||
575 | .chars_in_buffer = pty_chars_in_buffer, | 568 | .chars_in_buffer = pty_chars_in_buffer, |
576 | .unthrottle = pty_unthrottle, | 569 | .unthrottle = pty_unthrottle, |
577 | .set_termios = pty_set_termios, | 570 | .set_termios = pty_set_termios, |
578 | .shutdown = pty_unix98_shutdown, | ||
579 | .cleanup = pty_cleanup, | 571 | .cleanup = pty_cleanup, |
580 | }; | 572 | }; |
581 | 573 | ||