vserver 1.9.3
[linux-2.6.git] / drivers / sbus / char / aurora.c
index d45619f..1ff81be 100644 (file)
@@ -1531,8 +1531,7 @@ static void aurora_close(struct tty_struct * tty, struct file * filp)
        aurora_shutdown_port(bp, port);
        if (tty->driver->flush_buffer)
                tty->driver->flush_buffer(tty);
-       if (tty->ldisc.flush_buffer)
-               tty->ldisc.flush_buffer(tty);
+       tty_ldisc_flush(tty);
        tty->closing = 0;
        port->event = 0;
        port->tty = 0;
@@ -1743,10 +1742,7 @@ static void aurora_flush_buffer(struct tty_struct *tty)
        port->xmit_cnt = port->xmit_head = port->xmit_tail = 0;
        restore_flags(flags);
        
-       wake_up_interruptible(&tty->write_wait);
-       if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
-           tty->ldisc.write_wakeup)
-               (tty->ldisc.write_wakeup)(tty);
+       tty_wakeup(tty);
 #ifdef AURORA_DEBUG
        printk("aurora_flush_buffer: end\n");
 #endif
@@ -2223,10 +2219,7 @@ static void do_softint(void *private_)
                return;
 
        if (test_and_clear_bit(RS_EVENT_WRITE_WAKEUP, &port->event)) {
-               if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
-                   tty->ldisc.write_wakeup)
-                       (tty->ldisc.write_wakeup)(tty);
-               wake_up_interruptible(&tty->write_wait);
+               tty_wakeup(tty);
        }
 #ifdef AURORA_DEBUG
        printk("do_softint: end\n");