summaryrefslogtreecommitdiffstats
path: root/drivers/char/hvsi.c
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2006-08-08 09:09:11 +0200
committerPaul Mackerras <paulus@samba.org>2006-08-08 09:09:11 +0200
commit32bc6e095d75233e7c87cc6fa0e07942b124d194 (patch)
tree8f83ef9a23d52d1305878b65dd98fc22b09b7f3e /drivers/char/hvsi.c
parent[POWERPC] Update lppaca offset comments (diff)
parent[POWERPC] Fix might-sleep warning on removing cpus (diff)
downloadlinux-32bc6e095d75233e7c87cc6fa0e07942b124d194.tar.xz
linux-32bc6e095d75233e7c87cc6fa0e07942b124d194.zip
Merge branch 'merge'
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 9101784ecf02..a89a95fb5e40 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: