From: Atsushi Nemoto Date: Thu, 2 Feb 2006 20:53:39 +0000 (+0000) Subject: [SERIAL] initialize spinlock for port failed to setup console X-Git-Tag: v2.6.16-rc3~206^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9c0f4755bd5a117595761c95b93c29e8d9ca07b5;p=pandora-kernel.git [SERIAL] initialize spinlock for port failed to setup console It seems serial_core intend to initialize port->lock just once for each ports. This is done in uart_set_options() for console, and in uart_add_one_port() for other ports. But there is a case the port->lock is not initialized by serial_core. If the setup function for the console was failed, it will not call uart_set_options() but the port is marked as console (uart_console(port) returns 1). It can happen if console was PCI port which can not detected at the time of register_console. This patch is to initialize port->lock for such console port. With this change, most of spin_lock_init() (some of them are labeled "Temporary fix.") in low-level serial drivers can be omitted. Signed-off-by: Atsushi Nemoto Signed-off-by: Andrew Morton Signed-off-by: Russell King --- Reading git-diff-tree failed