@@ -480,7 +480,7 @@ static int hvc_push(struct hvc_struct *hp)
n = hp->ops->put_chars(hp->vtermno, hp->outbuf, hp->n_outbuf);
if (n <= 0) {
if (n == 0 || n == -EAGAIN) {
- hp->do_wakeup = 1;
+ tty_port_tty_wakeup(&hp->port);
return 0;
}
/* throw away output on error; this happens when
@@ -491,7 +491,7 @@ static int hvc_push(struct hvc_struct *hp)
if (hp->n_outbuf > 0)
memmove(hp->outbuf, hp->outbuf + n, hp->n_outbuf);
else
- hp->do_wakeup = 1;
+ tty_port_tty_wakeup(&hp->port);
return n;
}
@@ -739,11 +739,7 @@ static int __hvc_poll(struct hvc_struct *hp, bool may_sleep)
poll_mask |= HVC_POLL_READ;
out:
- /* Wakeup write queue if necessary */
- if (hp->do_wakeup) {
- hp->do_wakeup = 0;
- tty_wakeup(tty);
- }
+ /* Wakeup in hvc_push */
bail:
spin_unlock_irqrestore(&hp->lock, flags);
@@ -36,7 +36,6 @@ struct hvc_struct {
struct tty_port port;
spinlock_t lock;
int index;
- int do_wakeup;
int outbuf_size;
int n_outbuf;
uint32_t vtermno;