vserver 1.9.3
[linux-2.6.git] / drivers / char / generic_serial.c
index 1027eb7..45bc1be 100644 (file)
@@ -436,9 +436,7 @@ void gs_flush_buffer(struct tty_struct *tty)
        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);
        func_exit ();
 }
 
@@ -578,9 +576,7 @@ void gs_do_softint(void *private_)
        if (!tty) 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);
+               tty_wakeup(tty);
                wake_up_interruptible(&tty->write_wait);
        }
        func_exit ();
@@ -694,7 +690,7 @@ void gs_close(struct tty_struct * tty, struct file * filp)
 {
        unsigned long flags;
        struct gs_port *port;
-
+       
        func_enter ();
 
        if (!tty) return;
@@ -760,8 +756,8 @@ void gs_close(struct tty_struct * tty, struct file * filp)
 
        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;