]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/serial/serial_core.c
serial: fix enable_irq_wake/disable_irq_wake imbalance in serial_core.c
[linux-2.6-omap-h63xx.git] / drivers / serial / serial_core.c
index eab032733790d5524ac9f14e8596c1a5a62e462c..53b03c629afffc86812e4fc22ba973d0c757cc5a 100644 (file)
@@ -2054,6 +2054,8 @@ int uart_suspend_port(struct uart_driver *drv, struct uart_port *port)
 int uart_resume_port(struct uart_driver *drv, struct uart_port *port)
 {
        struct uart_state *state = drv->state + port->line;
+       struct device *tty_dev;
+       struct uart_match match = {port, drv};
 
        mutex_lock(&state->mutex);
 
@@ -2063,7 +2065,8 @@ int uart_resume_port(struct uart_driver *drv, struct uart_port *port)
                return 0;
        }
 
-       if (!port->suspended) {
+       tty_dev = device_find_child(port->dev, &match, serial_match_port);
+       if (!port->suspended && device_may_wakeup(tty_dev)) {
                disable_irq_wake(port->irq);
                mutex_unlock(&state->mutex);
                return 0;