diff options
author | Jiri Slaby <jslaby@suse.cz> | 2013-03-07 07:12:34 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-03-18 19:24:30 -0400 |
commit | ee7970690568b0c875467f475d9c957ec0d9e099 (patch) | |
tree | cc24352913013c5e574d055d3c52a8f778150194 /drivers/tty/serial/crisv10.c | |
parent | 4d29994ddb4cc97e19a533834df2e0fdb1c1d8a8 (diff) |
TTY: cleanup tty->hw_stopped uses
tty->hw_stopped is set only by drivers to remember HW state. If it is
never set to 1 in a particular driver, there is no need to check it in
the driver at all. Remove such checks.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/crisv10.c')
-rw-r--r-- | drivers/tty/serial/crisv10.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/drivers/tty/serial/crisv10.c b/drivers/tty/serial/crisv10.c index 5f37c31e32bc..50f56f39d436 100644 --- a/drivers/tty/serial/crisv10.c +++ b/drivers/tty/serial/crisv10.c | |||
@@ -2534,8 +2534,7 @@ static void handle_ser_tx_interrupt(struct e100_serial *info) | |||
2534 | } | 2534 | } |
2535 | /* Normal char-by-char interrupt */ | 2535 | /* Normal char-by-char interrupt */ |
2536 | if (info->xmit.head == info->xmit.tail | 2536 | if (info->xmit.head == info->xmit.tail |
2537 | || info->port.tty->stopped | 2537 | || info->port.tty->stopped) { |
2538 | || info->port.tty->hw_stopped) { | ||
2539 | DFLOW(DEBUG_LOG(info->line, "tx_int: stopped %i\n", | 2538 | DFLOW(DEBUG_LOG(info->line, "tx_int: stopped %i\n", |
2540 | info->port.tty->stopped)); | 2539 | info->port.tty->stopped)); |
2541 | e100_disable_serial_tx_ready_irq(info); | 2540 | e100_disable_serial_tx_ready_irq(info); |
@@ -3098,7 +3097,6 @@ rs_flush_chars(struct tty_struct *tty) | |||
3098 | if (info->tr_running || | 3097 | if (info->tr_running || |
3099 | info->xmit.head == info->xmit.tail || | 3098 | info->xmit.head == info->xmit.tail || |
3100 | tty->stopped || | 3099 | tty->stopped || |
3101 | tty->hw_stopped || | ||
3102 | !info->xmit.buf) | 3100 | !info->xmit.buf) |
3103 | return; | 3101 | return; |
3104 | 3102 | ||
@@ -3176,7 +3174,6 @@ static int rs_raw_write(struct tty_struct *tty, | |||
3176 | 3174 | ||
3177 | if (info->xmit.head != info->xmit.tail && | 3175 | if (info->xmit.head != info->xmit.tail && |
3178 | !tty->stopped && | 3176 | !tty->stopped && |
3179 | !tty->hw_stopped && | ||
3180 | !info->tr_running) { | 3177 | !info->tr_running) { |
3181 | start_transmit(info); | 3178 | start_transmit(info); |
3182 | } | 3179 | } |
@@ -3733,10 +3730,8 @@ rs_set_termios(struct tty_struct *tty, struct ktermios *old_termios) | |||
3733 | 3730 | ||
3734 | /* Handle turning off CRTSCTS */ | 3731 | /* Handle turning off CRTSCTS */ |
3735 | if ((old_termios->c_cflag & CRTSCTS) && | 3732 | if ((old_termios->c_cflag & CRTSCTS) && |
3736 | !(tty->termios.c_cflag & CRTSCTS)) { | 3733 | !(tty->termios.c_cflag & CRTSCTS)) |
3737 | tty->hw_stopped = 0; | ||
3738 | rs_start(tty); | 3734 | rs_start(tty); |
3739 | } | ||
3740 | 3735 | ||
3741 | } | 3736 | } |
3742 | 3737 | ||
@@ -4256,9 +4251,6 @@ static void seq_line_info(struct seq_file *m, struct e100_serial *info) | |||
4256 | if (info->port.tty->stopped) | 4251 | if (info->port.tty->stopped) |
4257 | seq_printf(m, " stopped:%i", | 4252 | seq_printf(m, " stopped:%i", |
4258 | (int)info->port.tty->stopped); | 4253 | (int)info->port.tty->stopped); |
4259 | if (info->port.tty->hw_stopped) | ||
4260 | seq_printf(m, " hw_stopped:%i", | ||
4261 | (int)info->port.tty->hw_stopped); | ||
4262 | } | 4254 | } |
4263 | 4255 | ||
4264 | { | 4256 | { |