diff options
| author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-03-18 21:38:20 +0000 |
|---|---|---|
| committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-03-18 21:38:20 +0000 |
| commit | c592c761a36286ab83451daa37a21c8558ea99c0 (patch) | |
| tree | 8abf57708fabf2a915320e9515b1ae2730ebf499 /drivers/tty/tty_port.c | |
| parent | 63236f4038f7e14762114606d95769c32cf6cac1 (diff) | |
| parent | 33499df88b711725ee473ab5478e17efd21de4b0 (diff) | |
Merge remote-tracking branch 'regulator/topic/stub' into regulator-next
Diffstat (limited to 'drivers/tty/tty_port.c')
| -rw-r--r-- | drivers/tty/tty_port.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/tty/tty_port.c b/drivers/tty/tty_port.c index ef9dd628ba0b..bf6e238146ae 100644 --- a/drivers/tty/tty_port.c +++ b/drivers/tty/tty_port.c @@ -227,7 +227,6 @@ int tty_port_block_til_ready(struct tty_port *port, int do_clocal = 0, retval; unsigned long flags; DEFINE_WAIT(wait); - int cd; /* block if port is in the process of being closed */ if (tty_hung_up_p(filp) || port->flags & ASYNC_CLOSING) { @@ -284,11 +283,14 @@ int tty_port_block_til_ready(struct tty_port *port, retval = -ERESTARTSYS; break; } - /* Probe the carrier. For devices with no carrier detect this - will always return true */ - cd = tty_port_carrier_raised(port); + /* + * Probe the carrier. For devices with no carrier detect + * tty_port_carrier_raised will always return true. + * Never ask drivers if CLOCAL is set, this causes troubles + * on some hardware. + */ if (!(port->flags & ASYNC_CLOSING) && - (do_clocal || cd)) + (do_clocal || tty_port_carrier_raised(port))) break; if (signal_pending(current)) { retval = -ERESTARTSYS; |
