[PATCH] Char: tty_wakeup cleanup
[powerpc.git] / drivers / char / mxser.c
index c063359..df1e608 100644 (file)
@@ -717,6 +717,7 @@ static int mxser_init(void)
 
        /* Initialize the tty_driver structure */
        memset(mxvar_sdriver, 0, sizeof(struct tty_driver));
+       mxvar_sdriver->owner = THIS_MODULE;
        mxvar_sdriver->magic = TTY_DRIVER_MAGIC;
        mxvar_sdriver->name = "ttyMI";
        mxvar_sdriver->major = ttymajor;
@@ -1253,9 +1254,7 @@ static void mxser_flush_buffer(struct tty_struct *tty)
        spin_unlock_irqrestore(&info->slock, flags);
        /* above added by shinhay */
 
-       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);
 }
 
 static int mxser_ioctl(struct tty_struct *tty, struct file *file, unsigned int cmd, unsigned long arg)