aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAtsushi Nemoto <anemo@mba.ocn.ne.jp>2007-10-29 17:37:23 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-30 11:06:55 -0400
commit23f42b7b2e538a27bc457a9ba12a6656343dc5ea (patch)
treeda39ae248360520d1d430c936682a4834da7a262
parent10e27ed4bae199fefbc3e9f9473e32605797a003 (diff)
serial: fix serial_txx9 console initialization
Since commit 97d97224ff361e08777fb33e0fd193ca877dac28 ("[SERIAL] Fix console initialisation ordering"), serial_core calls ->pm() on initialization even if the port was used for console. This behaviour breaks serial_txx9 console since The serial_txx9 driver initialize its port entirely on its ->pm() method if new state was 0. This patch adds checking for oldstate value to fix this probelm. Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--drivers/serial/serial_txx9.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/serial/serial_txx9.c b/drivers/serial/serial_txx9.c
index 6846a6c38b6d..7ad21925869a 100644
--- a/drivers/serial/serial_txx9.c
+++ b/drivers/serial/serial_txx9.c
@@ -657,7 +657,15 @@ static void
657serial_txx9_pm(struct uart_port *port, unsigned int state, 657serial_txx9_pm(struct uart_port *port, unsigned int state,
658 unsigned int oldstate) 658 unsigned int oldstate)
659{ 659{
660 if (state == 0) 660 /*
661 * If oldstate was -1 this is called from
662 * uart_configure_port(). In this case do not initialize the
663 * port now, because the port was already initialized (for
664 * non-console port) or should not be initialized here (for
665 * console port). If we initialized the port here we lose
666 * serial console settings.
667 */
668 if (state == 0 && oldstate != -1)
661 serial_txx9_initialize(port); 669 serial_txx9_initialize(port);
662} 670}
663 671