fix early_serial_setup() regression
authorHelge Deller <deller@gmx.de>
Tue, 13 Jan 2009 21:51:07 +0000 (22:51 +0100)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 13 Jan 2009 22:03:43 +0000 (14:03 -0800)
Commit b430428a188e8a434325e251d0704af4b88b4711 ("8250: Don't clobber
spinlocks.") introduced a regression on the parisc architecture, which
broke the handover to the serial port at boottime.

early_serial_setup() was changed to only copy a subset of the uart_port
fields, and sadly the "type" and "line" fields were forgotten and thus
the serial port was not initialized and could not be used for a
handover.  This patch fixes this by copying the missing fields.

As this change to early_serial_setup() doesn't need an initialized
spinlock in the uart_port struct any longer, we can drop the spinlock
initialization in the superio driver.

Cc: David Daney <ddaney@caviumnetworks.com>
Cc: Tomaso Paoletti <tpaoletti@caviumnetworks.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Acked-by: Kyle McMartin <kyle@mcmartin.ca>
Cc: linux-parisc@vger.kernel.org
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/parisc/superio.c
drivers/serial/8250.c

index 1e93c837514f11fdf065ce80703ba57651276a2f..4fa3bb2ddfe4541a534ff75275a0948132d5f4d8 100644 (file)
@@ -405,7 +405,6 @@ static void __init superio_serial_init(void)
        serial_port.type        = PORT_16550A;
        serial_port.uartclk     = 115200*16;
        serial_port.fifosize    = 16;
-       spin_lock_init(&serial_port.lock);
 
        /* serial port #1 */
        serial_port.iobase      = sio_dev.sp1_base;
index 1889a63ebc2293cdcaa2b1f403f41ea142caf6af..0d934bfbdd9b2ded293260968927a7de5e776f88 100644 (file)
@@ -2839,6 +2839,8 @@ int __init early_serial_setup(struct uart_port *port)
        p->flags        = port->flags;
        p->mapbase      = port->mapbase;
        p->private_data = port->private_data;
+       p->type         = port->type;
+       p->line         = port->line;
 
        set_io_from_upio(p);
        if (port->serial_in)