]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/char/sx.c
synclink_gt: improve TIOCOUTQ accuracy
[linux-2.6-omap-h63xx.git] / drivers / char / sx.c
index b1239ee48b78f9e8ff04794e1b7e5c018ab0b5a3..2162439bbe487544c589c6f0c054e6d849257a94 100644 (file)
@@ -1840,7 +1840,7 @@ static int sx_fw_ioctl(struct inode *inode, struct file *filp,
        return rc;
 }
 
-static void sx_break(struct tty_struct *tty, int flag)
+static int sx_break(struct tty_struct *tty, int flag)
 {
        struct sx_port *port = tty->driver_data;
        int rv;
@@ -1857,6 +1857,7 @@ static void sx_break(struct tty_struct *tty, int flag)
                        read_sx_byte(port->board, CHAN_OFFSET(port, hi_hstat)));
        unlock_kernel();
        func_exit();
+       return 0;
 }
 
 static int sx_tiocmget(struct tty_struct *tty, struct file *file)
@@ -2395,6 +2396,7 @@ static int sx_init_portstructs(int nboards, int nports)
                board->ports = port;
                for (j = 0; j < boards[i].nports; j++) {
                        sx_dprintk(SX_DEBUG_INIT, "initing port %d\n", j);
+                       tty_port_init(&port->gs.port);
                        port->gs.magic = SX_MAGIC;
                        port->gs.close_delay = HZ / 2;
                        port->gs.closing_wait = 30 * HZ;
@@ -2407,7 +2409,6 @@ static int sx_init_portstructs(int nboards, int nports)
                        /*
                         * Initializing wait queue
                         */
-                       tty_port_init(&port->gs.port);
                        port++;
                }
        }