Skip to content

Commit 1281e36

Browse files
Andrew VictorRussell King
authored andcommitted
[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 <[email protected]> Signed-off-by: Russell King <[email protected]>
1 parent c4694c7 commit 1281e36

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

drivers/serial/serial_core.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1907,9 +1907,12 @@ uart_set_options(struct uart_port *port, struct console *co,
19071907
static void uart_change_pm(struct uart_state *state, int pm_state)
19081908
{
19091909
struct uart_port *port = state->port;
1910-
if (port->ops->pm)
1911-
port->ops->pm(port, pm_state, state->pm_state);
1912-
state->pm_state = pm_state;
1910+
1911+
if (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+
}
19131916
}
19141917

19151918
int uart_suspend_port(struct uart_driver *drv, struct uart_port *port)

0 commit comments

Comments
 (0)