diff options
Diffstat (limited to 'drivers/char/tty_io.c')
-rw-r--r-- | drivers/char/tty_io.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/drivers/char/tty_io.c b/drivers/char/tty_io.c index bd74e82d8a72..b846d87f2b56 100644 --- a/drivers/char/tty_io.c +++ b/drivers/char/tty_io.c | |||
@@ -784,11 +784,8 @@ restart: | |||
784 | } | 784 | } |
785 | 785 | ||
786 | clear_bit(TTY_LDISC, &tty->flags); | 786 | clear_bit(TTY_LDISC, &tty->flags); |
787 | clear_bit(TTY_DONT_FLIP, &tty->flags); | 787 | if (o_tty) |
788 | if (o_tty) { | ||
789 | clear_bit(TTY_LDISC, &o_tty->flags); | 788 | clear_bit(TTY_LDISC, &o_tty->flags); |
790 | clear_bit(TTY_DONT_FLIP, &o_tty->flags); | ||
791 | } | ||
792 | spin_unlock_irqrestore(&tty_ldisc_lock, flags); | 789 | spin_unlock_irqrestore(&tty_ldisc_lock, flags); |
793 | 790 | ||
794 | /* | 791 | /* |
@@ -1955,7 +1952,6 @@ static void release_dev(struct file * filp) | |||
1955 | * race with the set_ldisc code path. | 1952 | * race with the set_ldisc code path. |
1956 | */ | 1953 | */ |
1957 | clear_bit(TTY_LDISC, &tty->flags); | 1954 | clear_bit(TTY_LDISC, &tty->flags); |
1958 | clear_bit(TTY_DONT_FLIP, &tty->flags); | ||
1959 | cancel_delayed_work(&tty->buf.work); | 1955 | cancel_delayed_work(&tty->buf.work); |
1960 | 1956 | ||
1961 | /* | 1957 | /* |
@@ -2784,13 +2780,6 @@ static void flush_to_ldisc(void *private_) | |||
2784 | if (disc == NULL) /* !TTY_LDISC */ | 2780 | if (disc == NULL) /* !TTY_LDISC */ |
2785 | return; | 2781 | return; |
2786 | 2782 | ||
2787 | if (test_bit(TTY_DONT_FLIP, &tty->flags)) { | ||
2788 | /* | ||
2789 | * Do it after the next timer tick: | ||
2790 | */ | ||
2791 | schedule_delayed_work(&tty->buf.work, 1); | ||
2792 | goto out; | ||
2793 | } | ||
2794 | spin_lock_irqsave(&tty->buf.lock, flags); | 2783 | spin_lock_irqsave(&tty->buf.lock, flags); |
2795 | while((tbuf = tty->buf.head) != NULL) { | 2784 | while((tbuf = tty->buf.head) != NULL) { |
2796 | while ((count = tbuf->commit - tbuf->read) != 0) { | 2785 | while ((count = tbuf->commit - tbuf->read) != 0) { |
@@ -2809,7 +2798,7 @@ static void flush_to_ldisc(void *private_) | |||
2809 | tty_buffer_free(tty, tbuf); | 2798 | tty_buffer_free(tty, tbuf); |
2810 | } | 2799 | } |
2811 | spin_unlock_irqrestore(&tty->buf.lock, flags); | 2800 | spin_unlock_irqrestore(&tty->buf.lock, flags); |
2812 | out: | 2801 | |
2813 | tty_ldisc_deref(disc); | 2802 | tty_ldisc_deref(disc); |
2814 | } | 2803 | } |
2815 | 2804 | ||