diff options
Diffstat (limited to 'drivers/tty/serial/omap-serial.c')
-rw-r--r-- | drivers/tty/serial/omap-serial.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c index 6ef4cc49d81e..fb06def4d982 100644 --- a/drivers/tty/serial/omap-serial.c +++ b/drivers/tty/serial/omap-serial.c | |||
@@ -504,7 +504,7 @@ static unsigned int serial_omap_get_mctrl(struct uart_port *port) | |||
504 | static void serial_omap_set_mctrl(struct uart_port *port, unsigned int mctrl) | 504 | static void serial_omap_set_mctrl(struct uart_port *port, unsigned int mctrl) |
505 | { | 505 | { |
506 | struct uart_omap_port *up = to_uart_omap_port(port); | 506 | struct uart_omap_port *up = to_uart_omap_port(port); |
507 | unsigned char mcr = 0; | 507 | unsigned char mcr = 0, old_mcr; |
508 | 508 | ||
509 | dev_dbg(up->port.dev, "serial_omap_set_mctrl+%d\n", up->port.line); | 509 | dev_dbg(up->port.dev, "serial_omap_set_mctrl+%d\n", up->port.line); |
510 | if (mctrl & TIOCM_RTS) | 510 | if (mctrl & TIOCM_RTS) |
@@ -519,8 +519,10 @@ static void serial_omap_set_mctrl(struct uart_port *port, unsigned int mctrl) | |||
519 | mcr |= UART_MCR_LOOP; | 519 | mcr |= UART_MCR_LOOP; |
520 | 520 | ||
521 | pm_runtime_get_sync(up->dev); | 521 | pm_runtime_get_sync(up->dev); |
522 | up->mcr = serial_in(up, UART_MCR); | 522 | old_mcr = serial_in(up, UART_MCR); |
523 | up->mcr |= mcr; | 523 | old_mcr &= ~(UART_MCR_LOOP | UART_MCR_OUT2 | UART_MCR_OUT1 | |
524 | UART_MCR_DTR | UART_MCR_RTS); | ||
525 | up->mcr = old_mcr | mcr; | ||
524 | serial_out(up, UART_MCR, up->mcr); | 526 | serial_out(up, UART_MCR, up->mcr); |
525 | pm_runtime_mark_last_busy(up->dev); | 527 | pm_runtime_mark_last_busy(up->dev); |
526 | pm_runtime_put_autosuspend(up->dev); | 528 | pm_runtime_put_autosuspend(up->dev); |