]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - drivers/tty/serial/serial_core.c
Merge tag 'v2.6.38' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
[mv-sheeva.git] / drivers / tty / serial / serial_core.c
similarity index 99%
rename from drivers/serial/serial_core.c
rename to drivers/tty/serial/serial_core.c
index 9ffa5bee44ab17b852f9bbaa5b9a5a8f3853286d..460a72d91bb787e0bfd52e9aba2dc8674fb9244f 100644 (file)
@@ -1985,7 +1985,8 @@ int uart_suspend_port(struct uart_driver *drv, struct uart_port *uport)
 
        tty_dev = device_find_child(uport->dev, &match, serial_match_port);
        if (device_may_wakeup(tty_dev)) {
-               enable_irq_wake(uport->irq);
+               if (!enable_irq_wake(uport->irq))
+                       uport->irq_wake = 1;
                put_device(tty_dev);
                mutex_unlock(&port->mutex);
                return 0;
@@ -2051,7 +2052,10 @@ int uart_resume_port(struct uart_driver *drv, struct uart_port *uport)
 
        tty_dev = device_find_child(uport->dev, &match, serial_match_port);
        if (!uport->suspended && device_may_wakeup(tty_dev)) {
-               disable_irq_wake(uport->irq);
+               if (uport->irq_wake) {
+                       disable_irq_wake(uport->irq);
+                       uport->irq_wake = 0;
+               }
                mutex_unlock(&port->mutex);
                return 0;
        }
@@ -2134,6 +2138,7 @@ uart_report_port(struct uart_driver *drv, struct uart_port *port)
        case UPIO_AU:
        case UPIO_TSI:
        case UPIO_DWAPB:
+       case UPIO_DWAPB32:
                snprintf(address, sizeof(address),
                         "MMIO 0x%llx", (unsigned long long)port->mapbase);
                break;
@@ -2554,6 +2559,7 @@ int uart_match_port(struct uart_port *port1, struct uart_port *port2)
        case UPIO_AU:
        case UPIO_TSI:
        case UPIO_DWAPB:
+       case UPIO_DWAPB32:
                return (port1->mapbase == port2->mapbase);
        }
        return 0;