vserver 1.9.5.x5
[linux-2.6.git] / drivers / serial / sunsu.c
index 2446dd6..c8fce59 100644 (file)
@@ -95,7 +95,6 @@ struct uart_sunsu_port {
        enum su_type            su_type;
        unsigned int            type_probed;    /* XXX Stupid */
        int                     port_node;
-       unsigned int            irq;
 
 #ifdef CONFIG_SERIO
        struct serio            *serio;
@@ -684,14 +683,14 @@ static int sunsu_startup(struct uart_port *port)
        }
 
        if (up->su_type != SU_PORT_PORT) {
-               retval = request_irq(up->irq, sunsu_kbd_ms_interrupt,
+               retval = request_irq(up->port.irq, sunsu_kbd_ms_interrupt,
                                     SA_SHIRQ, su_typev[up->su_type], up);
        } else {
-               retval = request_irq(up->irq, sunsu_serial_interrupt,
+               retval = request_irq(up->port.irq, sunsu_serial_interrupt,
                                     SA_SHIRQ, su_typev[up->su_type], up);
        }
        if (retval) {
-               printk("su: Cannot register IRQ %d\n", up->irq);
+               printk("su: Cannot register IRQ %d\n", up->port.irq);
                return retval;
        }
 
@@ -779,7 +778,7 @@ static void sunsu_shutdown(struct uart_port *port)
         */
        (void) serial_in(up, UART_RX);
 
-       free_irq(up->irq, up);
+       free_irq(up->port.irq, up);
 }
 
 static void
@@ -990,7 +989,7 @@ static struct uart_sunsu_port sunsu_ports[UART_NR];
 
 #ifdef CONFIG_SERIO
 
-static spinlock_t sunsu_serio_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(sunsu_serio_lock);
 
 static int sunsu_serio_write(struct serio *serio, unsigned char ch)
 {
@@ -1078,7 +1077,7 @@ static void sunsu_autoconfig(struct uart_sunsu_port *up)
                                 * This is correct on both architectures.
                                 */
                                up->port.mapbase = dev->resource[0].start;
-                               up->irq = dev->irqs[0];
+                               up->port.irq = dev->irqs[0];
                                goto ebus_done;
                        }
                }
@@ -1091,7 +1090,7 @@ static void sunsu_autoconfig(struct uart_sunsu_port *up)
                                /* Same on sparc64. Cool architecure... */
                                up->port.membase = (char *) isa_dev->resource.start;
                                up->port.mapbase = isa_dev->resource.start;
-                               up->irq = isa_dev->irq;
+                               up->port.irq = isa_dev->irq;
                                goto ebus_done;
                        }
                }
@@ -1133,7 +1132,7 @@ static void sunsu_autoconfig(struct uart_sunsu_port *up)
        /*
         * There is no intr property on MrCoffee, so hardwire it.
         */
-       up->irq = IRQ_4M(13);
+       up->port.irq = IRQ_4M(13);
 #endif
 
 ebus_done:
@@ -1286,7 +1285,9 @@ static struct uart_driver sunsu_reg = {
 
 static int __init sunsu_kbd_ms_init(struct uart_sunsu_port *up, int channel)
 {
+#ifdef CONFIG_SERIO
        struct serio *serio;
+#endif
 
        up->port.line = channel;
        up->port.type = PORT_UNKNOWN;
@@ -1303,7 +1304,7 @@ static int __init sunsu_kbd_ms_init(struct uart_sunsu_port *up, int channel)
 
        printk(KERN_INFO "su%d at 0x%p (irq = %s) is a %s\n",
               channel,
-              up->port.membase, __irq_itoa(up->irq),
+              up->port.membase, __irq_itoa(up->port.irq),
               sunsu_type(&up->port));
 
 #ifdef CONFIG_SERIO
@@ -1533,6 +1534,7 @@ static int __init sunsu_serial_init(void)
        if (ret < 0)
                return ret;
 
+       sunsu_serial_console_init();
        for (i = 0; i < UART_NR; i++) {
                struct uart_sunsu_port *up = &sunsu_ports[i];
 
@@ -1705,7 +1707,6 @@ static int __init sunsu_probe(void)
         * Console must be initiated after the generic initialization.
         */
                sunsu_serial_init();
-       sunsu_serial_console_init();
 
        return 0;
 }