Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 207906
b: refs/heads/master
c: 3f582b8
h: refs/heads/master
v: v3
  • Loading branch information
Arnd Bergmann authored and Greg Kroah-Hartman committed Aug 10, 2010
1 parent 388570f commit 87e5dfd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 74c2107759dc6efaa1b9127014be58a742a1e7ac
refs/heads/master: 3f582b8c11014e4ce310d9839fb335164195333f
19 changes: 9 additions & 10 deletions trunk/drivers/serial/serial_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1520,8 +1520,16 @@ static void uart_dtr_rts(struct tty_port *port, int onoff)
struct uart_state *state = container_of(port, struct uart_state, port);
struct uart_port *uport = state->uart_port;

if (onoff)
if (onoff) {
uart_set_mctrl(uport, TIOCM_DTR | TIOCM_RTS);

/*
* If this is the first open to succeed,
* adjust things to suit.
*/
if (!test_and_set_bit(ASYNCB_NORMAL_ACTIVE, &port->flags))
uart_update_termios(port->tty, state);
}
else
uart_clear_mctrl(uport, TIOCM_DTR | TIOCM_RTS);
}
Expand Down Expand Up @@ -1636,15 +1644,6 @@ static int uart_open(struct tty_struct *tty, struct file *filp)
if (retval == 0)
retval = tty_port_block_til_ready(port, tty, filp);

/*
* If this is the first open to succeed, adjust things to suit.
*/
if (retval == 0 && !(port->flags & ASYNC_NORMAL_ACTIVE)) {
set_bit(ASYNCB_NORMAL_ACTIVE, &port->flags);

uart_update_termios(tty, state);
}

fail:
return retval;
}
Expand Down

0 comments on commit 87e5dfd

Please sign in to comment.