Merge master.kernel.org:/home/rmk/linux-2.6-arm
[powerpc.git] / drivers / serial / serial_core.c
index 68aa4da..3bb5d24 100644 (file)
@@ -1875,6 +1875,7 @@ uart_set_options(struct uart_port *port, struct console *co,
                 int baud, int parity, int bits, int flow)
 {
        struct ktermios termios;
+       static struct ktermios dummy;
        int i;
 
        /*
@@ -1920,7 +1921,7 @@ uart_set_options(struct uart_port *port, struct console *co,
         */
        port->mctrl |= TIOCM_DTR;
 
-       port->ops->set_termios(port, &termios, NULL);
+       port->ops->set_termios(port, &termios, &dummy);
        co->cflag = termios.c_cflag;
 
        return 0;
@@ -1959,12 +1960,11 @@ 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)) {
+       if (!console_suspend_enabled && uart_console(port)) {
+               /* we're going to avoid suspending serial console */
                mutex_unlock(&state->mutex);
                return 0;
        }
-#endif
 
        tty_dev = device_find_child(port->dev, &match, serial_match_port);
        if (device_may_wakeup(tty_dev)) {
@@ -2016,12 +2016,11 @@ 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)) {
+       if (!console_suspend_enabled && uart_console(port)) {
+               /* no need to resume serial console, it wasn't suspended */
                mutex_unlock(&state->mutex);
                return 0;
        }
-#endif
 
        if (!port->suspended) {
                disable_irq_wake(port->irq);