]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - drivers/serial/serial_core.c
Merge branch 'slub-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/christoph/vm
[mv-sheeva.git] / drivers / serial / serial_core.c
index 68aa4da0186573fce0ed514f0d1ea0e784e864e5..3bb5d241dd40b2a13424aa42a86acba5ff4b44a3 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);