Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 9c0f4755 authored by Atsushi Nemoto's avatar Atsushi Nemoto Committed by Russell King
Browse files

[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: default avatarAtsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 3ec9c594
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment