diff options
-rw-r--r-- | drivers/serial/serial_core.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/serial/serial_core.c b/drivers/serial/serial_core.c index eab032733790..53b03c629aff 100644 --- a/drivers/serial/serial_core.c +++ b/drivers/serial/serial_core.c | |||
@@ -2054,6 +2054,8 @@ int uart_suspend_port(struct uart_driver *drv, struct uart_port *port) | |||
2054 | int uart_resume_port(struct uart_driver *drv, struct uart_port *port) | 2054 | int uart_resume_port(struct uart_driver *drv, struct uart_port *port) |
2055 | { | 2055 | { |
2056 | struct uart_state *state = drv->state + port->line; | 2056 | struct uart_state *state = drv->state + port->line; |
2057 | struct device *tty_dev; | ||
2058 | struct uart_match match = {port, drv}; | ||
2057 | 2059 | ||
2058 | mutex_lock(&state->mutex); | 2060 | mutex_lock(&state->mutex); |
2059 | 2061 | ||
@@ -2063,7 +2065,8 @@ int uart_resume_port(struct uart_driver *drv, struct uart_port *port) | |||
2063 | return 0; | 2065 | return 0; |
2064 | } | 2066 | } |
2065 | 2067 | ||
2066 | if (!port->suspended) { | 2068 | tty_dev = device_find_child(port->dev, &match, serial_match_port); |
2069 | if (!port->suspended && device_may_wakeup(tty_dev)) { | ||
2067 | disable_irq_wake(port->irq); | 2070 | disable_irq_wake(port->irq); |
2068 | mutex_unlock(&state->mutex); | 2071 | mutex_unlock(&state->mutex); |
2069 | return 0; | 2072 | return 0; |