diff options
author | Peter Hurley <peter@hurleysoftware.com> | 2013-09-17 12:53:35 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-09-25 21:05:32 -0400 |
commit | c786f74e0bcc457e85cc1eee551732afa60d6308 (patch) | |
tree | 0583232f3f79df8c92e52880b6b68cdd27aeca2d /drivers/tty/n_tty.c | |
parent | 1cb40d08726468602389c9a7ec345af5ade99775 (diff) |
n_tty: Remove unnecessary local variable
Flatten conditional evaluation in n_tty_set_termios; remove
canon_change.
Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/n_tty.c')
-rw-r--r-- | drivers/tty/n_tty.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/tty/n_tty.c b/drivers/tty/n_tty.c index 41c0c80094a5..5372bf0e74ab 100644 --- a/drivers/tty/n_tty.c +++ b/drivers/tty/n_tty.c | |||
@@ -1752,11 +1752,8 @@ int is_ignored(int sig) | |||
1752 | static void n_tty_set_termios(struct tty_struct *tty, struct ktermios *old) | 1752 | static void n_tty_set_termios(struct tty_struct *tty, struct ktermios *old) |
1753 | { | 1753 | { |
1754 | struct n_tty_data *ldata = tty->disc_data; | 1754 | struct n_tty_data *ldata = tty->disc_data; |
1755 | int canon_change = 1; | ||
1756 | 1755 | ||
1757 | if (old) | 1756 | if (!old || (old->c_lflag ^ tty->termios.c_lflag) & ICANON) { |
1758 | canon_change = (old->c_lflag ^ tty->termios.c_lflag) & ICANON; | ||
1759 | if (canon_change) { | ||
1760 | bitmap_zero(ldata->read_flags, N_TTY_BUF_SIZE); | 1757 | bitmap_zero(ldata->read_flags, N_TTY_BUF_SIZE); |
1761 | ldata->line_start = 0; | 1758 | ldata->line_start = 0; |
1762 | ldata->canon_head = ldata->read_tail; | 1759 | ldata->canon_head = ldata->read_tail; |