Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6
[pandora-kernel.git] / drivers / serial / serial_core.c
index d5f636f..5f7ba1a 100644 (file)
@@ -1929,6 +1929,13 @@ int uart_suspend_port(struct uart_driver *drv, struct uart_port *port)
 
        mutex_lock(&state->mutex);
 
+#ifdef CONFIG_DISABLE_CONSOLE_SUSPEND
+       if (uart_console(port)) {
+               mutex_unlock(&state->mutex);
+               return 0;
+       }
+#endif
+
        if (state->info && state->info->flags & UIF_INITIALIZED) {
                const struct uart_ops *ops = port->ops;
 
@@ -1967,6 +1974,13 @@ int uart_resume_port(struct uart_driver *drv, struct uart_port *port)
 
        mutex_lock(&state->mutex);
 
+#ifdef CONFIG_DISABLE_CONSOLE_SUSPEND
+       if (uart_console(port)) {
+               mutex_unlock(&state->mutex);
+               return 0;
+       }
+#endif
+
        uart_change_pm(state, 0);
 
        /*
@@ -2036,6 +2050,7 @@ uart_report_port(struct uart_driver *drv, struct uart_port *port)
        case UPIO_MEM:
        case UPIO_MEM32:
        case UPIO_AU:
+       case UPIO_TSI:
                snprintf(address, sizeof(address),
                         "MMIO 0x%lx", port->mapbase);
                break;
@@ -2376,6 +2391,9 @@ int uart_match_port(struct uart_port *port1, struct uart_port *port2)
                return (port1->iobase == port2->iobase) &&
                       (port1->hub6   == port2->hub6);
        case UPIO_MEM:
+       case UPIO_MEM32:
+       case UPIO_AU:
+       case UPIO_TSI:
                return (port1->mapbase == port2->mapbase);
        }
        return 0;