From fb0eb00e657692c2ac3d5c05f063ae35c2c8543d Mon Sep 17 00:00:00 2001 From: Michael Gernoth Date: Wed, 9 Nov 2016 01:31:20 +0100 Subject: Revert "BACKPORT: tty: Prevent ldisc drivers from re-using stale tty fields" This is not compatible with the TTY-layer in 3.0 which expects to be able to use these fields as they are valid in the TTY-layer in this version. This reverts commit 6e325381fcd82b9795bd0b5db71b67672d048fbc. Change-Id: I148806274b7ffea29746865e5d53b4b8b698f6c7 --- drivers/tty/tty_ldisc.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/drivers/tty/tty_ldisc.c b/drivers/tty/tty_ldisc.c index 606c0956..a76c808 100644 --- a/drivers/tty/tty_ldisc.c +++ b/drivers/tty/tty_ldisc.c @@ -424,10 +424,6 @@ EXPORT_SYMBOL_GPL(tty_ldisc_flush); * they are not on hot paths so a little discipline won't do * any harm. * - * The line discipline-related tty_struct fields are reset to - * prevent the ldisc driver from re-using stale information for - * the new ldisc instance. - * * Locking: takes termios_mutex */ @@ -436,9 +432,6 @@ static void tty_set_termios_ldisc(struct tty_struct *tty, int num) mutex_lock(&tty->termios_mutex); tty->termios->c_line = num; mutex_unlock(&tty->termios_mutex); - - tty->disc_data = NULL; - tty->receive_room = 0; } /** -- cgit v1.1