aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/tty_ldisc.c
diff options
context:
space:
mode:
authorPeter Hurley <peter@hurleysoftware.com>2014-11-05 12:12:58 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-11-05 21:42:46 -0500
commit62462aefeb5aff092fc97037d9c12a4afe95a3ff (patch)
tree23ca93e2b8758158fff67a76e5851e22032811a9 /drivers/tty/tty_ldisc.c
parent949aa64ff90d9a9b3aae13bb5a8247614adf4600 (diff)
tty: Simplify tty_ldisc_release() interface
Passing the 'other' tty to tty_ldisc_release() only makes sense for a pty pair; make o_tty function local instead. Reviewed-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/tty_ldisc.c')
-rw-r--r--drivers/tty/tty_ldisc.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/tty/tty_ldisc.c b/drivers/tty/tty_ldisc.c
index 49001fa2ea2f..1c4d7b6d8a76 100644
--- a/drivers/tty/tty_ldisc.c
+++ b/drivers/tty/tty_ldisc.c
@@ -756,18 +756,17 @@ static void tty_ldisc_kill(struct tty_struct *tty)
756 756
757/** 757/**
758 * tty_ldisc_release - release line discipline 758 * tty_ldisc_release - release line discipline
759 * @tty: tty being shut down 759 * @tty: tty being shut down (or one end of pty pair)
760 * @o_tty: pair tty for pty/tty pairs
761 *
762 * Called during the final close of a tty/pty pair in order to shut down
763 * the line discpline layer. On exit the ldisc assigned is N_TTY and the
764 * ldisc has not been opened.
765 * 760 *
766 * Holding ldisc_sem write lock serializes tty->ldisc changes. 761 * Called during the final close of a tty or a pty pair in order to shut
762 * down the line discpline layer. On exit, each ldisc assigned is N_TTY and
763 * each ldisc has not been opened.
767 */ 764 */
768 765
769void tty_ldisc_release(struct tty_struct *tty, struct tty_struct *o_tty) 766void tty_ldisc_release(struct tty_struct *tty)
770{ 767{
768 struct tty_struct *o_tty = tty->link;
769
771 /* 770 /*
772 * Shutdown this line discipline. As this is the final close, 771 * Shutdown this line discipline. As this is the final close,
773 * it does not race with the set_ldisc code path. 772 * it does not race with the set_ldisc code path.