diff options
author | Jeff Garzik <jeff@garzik.org> | 2007-02-17 23:09:59 +0300 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-02-17 23:09:59 +0300 |
commit | 48c871c1f6a7c7044dd76774fb469e65c7e2e4e8 (patch) | |
tree | da3aa535c98cc0957851354ceb0fbff7482d7a9d /drivers/isdn/gigaset/interface.c | |
parent | 1a1689344add3333d28d1b5495d8043a3877d01c (diff) | |
parent | 4409d28140d9a6e6e3f4f1fdaf7234c4b965d954 (diff) | |
download | linux-48c871c1f6a7c7044dd76774fb469e65c7e2e4e8.tar.xz |
Merge branch 'gfar' of master.kernel.org:/pub/scm/linux/kernel/git/galak/powerpc into upstream
Diffstat (limited to 'drivers/isdn/gigaset/interface.c')
-rw-r--r-- | drivers/isdn/gigaset/interface.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/drivers/isdn/gigaset/interface.c b/drivers/isdn/gigaset/interface.c index 458b6462f937..eb50f3dab5f7 100644 --- a/drivers/isdn/gigaset/interface.c +++ b/drivers/isdn/gigaset/interface.c @@ -599,19 +599,9 @@ out: static void if_wake(unsigned long data) { struct cardstate *cs = (struct cardstate *) data; - struct tty_struct *tty; - - tty = cs->tty; - if (!tty) - return; - - if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && - tty->ldisc.write_wakeup) { - gig_dbg(DEBUG_IF, "write wakeup call"); - tty->ldisc.write_wakeup(tty); - } - wake_up_interruptible(&tty->write_wait); + if (cs->tty) + tty_wakeup(cs->tty); } /*** interface to common ***/ @@ -625,6 +615,8 @@ void gigaset_if_init(struct cardstate *cs) return; tasklet_init(&cs->if_wake_tasklet, &if_wake, (unsigned long) cs); + + mutex_lock(&cs->mutex); cs->tty_dev = tty_register_device(drv->tty, cs->minor_index, NULL); if (!IS_ERR(cs->tty_dev)) @@ -633,6 +625,7 @@ void gigaset_if_init(struct cardstate *cs) warn("could not register device to the tty subsystem"); cs->tty_dev = NULL; } + mutex_unlock(&cs->mutex); } void gigaset_if_free(struct cardstate *cs) |