aboutsummaryrefslogtreecommitdiff
path: root/drivers/char/hvsi.c
diff options
context:
space:
mode:
authorJeff Garzik <jeff@garzik.org>2006-08-07 06:43:17 -0400
committerJeff Garzik <jeff@garzik.org>2006-08-07 06:43:17 -0400
commit38ebb1e0ed214efe124534eba4a34e869a0d8da7 (patch)
tree3712611527654e81109d194d903401c86763e3f4 /drivers/char/hvsi.c
parent236a686b56428a8967a057a2396f9be74e2ee652 (diff)
parent9f737633e6ee54fc174282d49b2559bd2208391d (diff)
Merge branch 'master' into upstream
Diffstat (limited to 'drivers/char/hvsi.c')
-rw-r--r--drivers/char/hvsi.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/char/hvsi.c b/drivers/char/hvsi.c
index 41db8060e8f..017f755632a 100644
--- a/drivers/char/hvsi.c
+++ b/drivers/char/hvsi.c
@@ -311,7 +311,8 @@ static void hvsi_recv_control(struct hvsi_struct *hp, uint8_t *packet,
/* CD went away; no more connection */
pr_debug("hvsi%i: CD dropped\n", hp->index);
hp->mctrl &= TIOCM_CD;
- if (!(hp->tty->flags & CLOCAL))
+ /* If userland hasn't done an open(2) yet, hp->tty is NULL. */
+ if (hp->tty && !(hp->tty->flags & CLOCAL))
*to_hangup = hp->tty;
}
break;
@@ -986,10 +987,7 @@ static void hvsi_write_worker(void *arg)
start_j = 0;
#endif /* DEBUG */
wake_up_all(&hp->emptyq);
- if (test_bit(TTY_DO_WRITE_WAKEUP, &hp->tty->flags)
- && hp->tty->ldisc.write_wakeup)
- hp->tty->ldisc.write_wakeup(hp->tty);
- wake_up_interruptible(&hp->tty->write_wait);
+ tty_wakeup(hp->tty);
}
out: