lkml.org 
[lkml]   [2006]   [Jan]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] serial: Add spin_lock_init() in 8250 early_serial_setup() to init port.lock
Need spin_lock_init(&serial8250_ports[port->line].port.lock) in
early_serial_setup() since we're copying struct uart_port *port
into serial8250_ports[port->line].port and *port.lock is typically
unitiliased by the caller.

Signed-off-by: George G. Davis <gdavis@mvista.com>

Index: linux-2.6/drivers/serial/8250.c
===================================================================
--- linux-2.6.orig/drivers/serial/8250.c
+++ linux-2.6/drivers/serial/8250.c
@@ -2340,6 +2340,7 @@ int __init early_serial_setup(struct uar
serial8250_isa_init_ports();
serial8250_ports[port->line].port = *port;
serial8250_ports[port->line].port.ops = &serial8250_pops;
+ spin_lock_init(&serial8250_ports[port->line].port.lock);
return 0;
}

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2006-01-26 04:30    [W:0.087 / U:3.448 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site