提交 1281e360 编写于 作者: A Andrew Victor 提交者: Russell King

[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: NAndrew Victor <andrew@sanpeople.com>
Signed-off-by: NRussell King <rmk+kernel@arm.linux.org.uk>
上级 c4694c76
......@@ -1907,9 +1907,12 @@ uart_set_options(struct uart_port *port, struct console *co,
static void uart_change_pm(struct uart_state *state, int pm_state)
{
struct uart_port *port = state->port;
if (port->ops->pm)
port->ops->pm(port, pm_state, state->pm_state);
state->pm_state = pm_state;
if (state->pm_state != pm_state) {
if (port->ops->pm)
port->ops->pm(port, pm_state, state->pm_state);
state->pm_state = pm_state;
}
}
int uart_suspend_port(struct uart_driver *drv, struct uart_port *port)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册