X-Git-Url: https://git.ti.com/gitweb?p=android-sdk%2Fkernel-video.git;a=blobdiff_plain;f=drivers%2Ftty%2Fserial%2Fserial_core.c;h=cbbd11a0722f8b5793fc1dbefd6b54af9d178273;hp=aa2e85dc1e2251e29e32af6f06ca15bc55f7c902;hb=b49d9b996deb084dc16ad9040f52ef11958c514c;hpb=5d79b66e9ff2cfac584966fcd967abf7ef49d042 diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c index aa2e85dc1e2..cbbd11a0722 100644 --- a/drivers/tty/serial/serial_core.c +++ b/drivers/tty/serial/serial_core.c @@ -50,12 +50,6 @@ static struct lock_class_key port_lock_key; #define HIGH_BITS_OFFSET ((sizeof(long)-sizeof(int))*8) -#ifdef CONFIG_SERIAL_CORE_CONSOLE -#define uart_console(port) ((port)->cons && (port)->cons->index == (port)->line) -#else -#define uart_console(port) (0) -#endif - static void uart_change_speed(struct tty_struct *tty, struct uart_state *state, struct ktermios *old_termios); static void uart_wait_until_sent(struct tty_struct *tty, int timeout); @@ -1943,6 +1937,8 @@ int uart_suspend_port(struct uart_driver *drv, struct uart_port *uport) mutex_unlock(&port->mutex); return 0; } + put_device(tty_dev); + if (console_suspend_enabled || !uart_console(uport)) uport->suspended = 1; @@ -2008,9 +2004,11 @@ int uart_resume_port(struct uart_driver *drv, struct uart_port *uport) disable_irq_wake(uport->irq); uport->irq_wake = 0; } + put_device(tty_dev); mutex_unlock(&port->mutex); return 0; } + put_device(tty_dev); uport->suspended = 0; /*