diff options
author | Andrew Victor <andrew@sanpeople.com> | 2006-05-16 06:28:49 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2006-05-16 06:28:49 -0400 |
commit | 1281e36027a9119356bd93b5e7853c72c35dd462 (patch) | |
tree | c10b62b061a3a3f74a1e94ac539345ebaf8708ed /drivers/serial/serial_core.c | |
parent | c4694c76ce28dd7e415b4f3014d8c6e580b5f3d2 (diff) |
[ARM] 3523/1: Serial core pm_state
Patch from Andrew Victor
The serial_core already manages the power state of the UARTs, and
therefore it shouldn't suspend a UART which was previously suspended.
This patch modifies serial_core only call the UART-specific
power-management function if the PM state is actually changing.
Signed-off-by: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'drivers/serial/serial_core.c')
-rw-r--r-- | drivers/serial/serial_core.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/serial/serial_core.c b/drivers/serial/serial_core.c index aeb8153ccf2..17839e753e4 100644 --- a/drivers/serial/serial_core.c +++ b/drivers/serial/serial_core.c | |||
@@ -1907,9 +1907,12 @@ uart_set_options(struct uart_port *port, struct console *co, | |||
1907 | static void uart_change_pm(struct uart_state *state, int pm_state) | 1907 | static void uart_change_pm(struct uart_state *state, int pm_state) |
1908 | { | 1908 | { |
1909 | struct uart_port *port = state->port; | 1909 | struct uart_port *port = state->port; |
1910 | if (port->ops->pm) | 1910 | |
1911 | port->ops->pm(port, pm_state, state->pm_state); | 1911 | if (state->pm_state != pm_state) { |
1912 | state->pm_state = pm_state; | 1912 | if (port->ops->pm) |
1913 | port->ops->pm(port, pm_state, state->pm_state); | ||
1914 | state->pm_state = pm_state; | ||
1915 | } | ||
1913 | } | 1916 | } |
1914 | 1917 | ||
1915 | int uart_suspend_port(struct uart_driver *drv, struct uart_port *port) | 1918 | int uart_suspend_port(struct uart_driver *drv, struct uart_port *port) |