Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9d778a69370cc1b643b13648df971c83ff5654ef
Commit:     9d778a69370cc1b643b13648df971c83ff5654ef
Parent:     74a197417240120d638d67d74f48655fb7f46f16
Author:     Russell King <[EMAIL PROTECTED]>
AuthorDate: Mon Feb 4 22:27:51 2008 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Tue Feb 5 09:44:09 2008 -0800

    serial: avoid waking up closed serial ports on resume
    
    When we boot, serial ports remain in low power mode until they're used 
either
    by userspace or for the kernel console.
    
    However, if you suspend the system, and then resume, all serial ports will 
be
    taken out of low power mode.  This is bad news for embedded devices where 
this
    can mean higher power consumption.
    
    Only bring a serial port out of low power mode if the port is being used as
    the kernel console, or is in use by userspace.
    
    Signed-off-by: Russell King <[EMAIL PROTECTED]>
    Acked-by: Alan Cox <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 drivers/serial/serial_core.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/serial/serial_core.c b/drivers/serial/serial_core.c
index 0cf382b..2554d2f 100644
--- a/drivers/serial/serial_core.c
+++ b/drivers/serial/serial_core.c
@@ -2029,8 +2029,6 @@ int uart_resume_port(struct uart_driver *drv, struct 
uart_port *port)
        }
        port->suspended = 0;
 
-       uart_change_pm(state, 0);
-
        /*
         * Re-enable the console device after suspending.
         */
@@ -2049,6 +2047,7 @@ int uart_resume_port(struct uart_driver *drv, struct 
uart_port *port)
                if (state->info && state->info->tty && termios.c_cflag == 0)
                        termios = *state->info->tty->termios;
 
+               uart_change_pm(state, 0);
                port->ops->set_termios(port, &termios, NULL);
                console_start(port->cons);
        }
@@ -2057,6 +2056,7 @@ int uart_resume_port(struct uart_driver *drv, struct 
uart_port *port)
                const struct uart_ops *ops = port->ops;
                int ret;
 
+               uart_change_pm(state, 0);
                ops->set_mctrl(port, 0);
                ret = ops->startup(port);
                if (ret == 0) {
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to