tunnels: fix netns vs proto registration ordering
[safe/jmp/linux-2.6] / drivers / serial / mux.c
index f5b17f5..7571aaa 100644 (file)
@@ -83,19 +83,20 @@ static struct timer_list mux_timer;
  */
 static int __init get_mux_port_count(struct parisc_device *dev)
 {
+       int status;
        u8 iodc_data[32];
        unsigned long bytecnt;
 
-       int status = pdc_iodc_read(&bytecnt, dev->hpa.start, 0, iodc_data, 32);
-       BUG_ON(status != PDC_OK);
-
        /* If this is the built-in Mux for the K-Class (Eole CAP/MUX),
         * we only need to allocate resources for 1 port since the
         * other 7 ports are not connected.
         */
-       if(((iodc_data[0] << 4) | ((iodc_data[1] & 0xf0) >> 4)) == 0x15)
+       if(dev->id.hversion == 0x15)
                return 1;
 
+       status = pdc_iodc_read(&bytecnt, dev->hpa.start, 0, iodc_data, 32);
+       BUG_ON(status != PDC_OK);
+
        /* Return the number of ports specified in the iodc data. */
        return ((((iodc_data)[4] & 0xf0) >> 4) * 8) + 8;
 }
@@ -198,7 +199,7 @@ static void mux_break_ctl(struct uart_port *port, int break_state)
 static void mux_write(struct uart_port *port)
 {
        int count;
-       struct circ_buf *xmit = &port->info->xmit;
+       struct circ_buf *xmit = &port->state->xmit;
 
        if(port->x_char) {
                UART_PUT_CHAR(port, port->x_char);
@@ -242,7 +243,7 @@ static void mux_write(struct uart_port *port)
 static void mux_read(struct uart_port *port)
 {
        int data;
-       struct tty_struct *tty = port->info->tty;
+       struct tty_struct *tty = port->state->port.tty;
        __u32 start_count = port->icount.rx;
 
        while(1) {
@@ -306,8 +307,8 @@ static void mux_shutdown(struct uart_port *port)
  * The Serial Mux does not support this function.
  */
 static void
-mux_set_termios(struct uart_port *port, struct termios *termios,
-               struct termios *old)
+mux_set_termios(struct uart_port *port, struct ktermios *termios,
+               struct ktermios *old)
 {
 }
 
@@ -581,7 +582,7 @@ static struct parisc_driver serial_mux_driver = {
 };
 
 /**
- * mux_init - Serial MUX initalization procedure.
+ * mux_init - Serial MUX initialization procedure.
  *
  * Register the Serial MUX driver.
  */