diff options
author | Jiri Slaby <jslaby@suse.cz> | 2012-04-02 07:54:17 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-04-09 14:28:17 -0400 |
commit | 20acdfa85c1c0292ee710335900dc04aa7b634a3 (patch) | |
tree | 4a3ca8e266b8ed285a35c360e22e8744dc865c21 /drivers/s390/char | |
parent | 881e18f960478013b49a48ed6f7b3bf60c6f874f (diff) |
TTY: tty3270, push tty down to tty3270_do_write
So that we do not need to access tp->tty there. It is going away.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: linux390@de.ibm.com
Cc: linux-s390@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/s390/char')
-rw-r--r-- | drivers/s390/char/tty3270.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/s390/char/tty3270.c b/drivers/s390/char/tty3270.c index bb1514a27f50..1f4aff78eaca 100644 --- a/drivers/s390/char/tty3270.c +++ b/drivers/s390/char/tty3270.c | |||
@@ -1509,12 +1509,13 @@ tty3270_escape_sequence(struct tty3270 *tp, char ch) | |||
1509 | * String write routine for 3270 ttys | 1509 | * String write routine for 3270 ttys |
1510 | */ | 1510 | */ |
1511 | static void | 1511 | static void |
1512 | tty3270_do_write(struct tty3270 *tp, const unsigned char *buf, int count) | 1512 | tty3270_do_write(struct tty3270 *tp, struct tty_struct *tty, |
1513 | const unsigned char *buf, int count) | ||
1513 | { | 1514 | { |
1514 | int i_msg, i; | 1515 | int i_msg, i; |
1515 | 1516 | ||
1516 | spin_lock_bh(&tp->view.lock); | 1517 | spin_lock_bh(&tp->view.lock); |
1517 | for (i_msg = 0; !tp->tty->stopped && i_msg < count; i_msg++) { | 1518 | for (i_msg = 0; !tty->stopped && i_msg < count; i_msg++) { |
1518 | if (tp->esc_state != 0) { | 1519 | if (tp->esc_state != 0) { |
1519 | /* Continue escape sequence. */ | 1520 | /* Continue escape sequence. */ |
1520 | tty3270_escape_sequence(tp, buf[i_msg]); | 1521 | tty3270_escape_sequence(tp, buf[i_msg]); |
@@ -1591,10 +1592,10 @@ tty3270_write(struct tty_struct * tty, | |||
1591 | if (!tp) | 1592 | if (!tp) |
1592 | return 0; | 1593 | return 0; |
1593 | if (tp->char_count > 0) { | 1594 | if (tp->char_count > 0) { |
1594 | tty3270_do_write(tp, tp->char_buf, tp->char_count); | 1595 | tty3270_do_write(tp, tty, tp->char_buf, tp->char_count); |
1595 | tp->char_count = 0; | 1596 | tp->char_count = 0; |
1596 | } | 1597 | } |
1597 | tty3270_do_write(tp, buf, count); | 1598 | tty3270_do_write(tp, tty, buf, count); |
1598 | return count; | 1599 | return count; |
1599 | } | 1600 | } |
1600 | 1601 | ||
@@ -1625,7 +1626,7 @@ tty3270_flush_chars(struct tty_struct *tty) | |||
1625 | if (!tp) | 1626 | if (!tp) |
1626 | return; | 1627 | return; |
1627 | if (tp->char_count > 0) { | 1628 | if (tp->char_count > 0) { |
1628 | tty3270_do_write(tp, tp->char_buf, tp->char_count); | 1629 | tty3270_do_write(tp, tty, tp->char_buf, tp->char_count); |
1629 | tp->char_count = 0; | 1630 | tp->char_count = 0; |
1630 | } | 1631 | } |
1631 | } | 1632 | } |