diff options
author | Huang Shijie <shijie8@gmail.com> | 2012-08-23 04:13:36 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-09-05 22:28:35 +0200 |
commit | f21ec3d2d46e5f2ffc06f31fe2704fdcea7a58f3 (patch) | |
tree | 5d814cd687776374f960d3af2490187c3fbdf750 /drivers/tty/amiserial.c | |
parent | serial: omap: define helpers for pdata function pointers (diff) | |
download | linux-f21ec3d2d46e5f2ffc06f31fe2704fdcea7a58f3.tar.xz linux-f21ec3d2d46e5f2ffc06f31fe2704fdcea7a58f3.zip |
serial: add a new helper function
In most of the time, the driver needs to check if the cts flow control
is enabled. But now, the driver checks the ASYNC_CTS_FLOW flag manually,
which is not a grace way. So add a new wraper function to make the code
tidy and clean.
Signed-off-by: Huang Shijie <shijie8@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/amiserial.c')
-rw-r--r-- | drivers/tty/amiserial.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/tty/amiserial.c b/drivers/tty/amiserial.c index 2b7535d42e05..42d0a2581a87 100644 --- a/drivers/tty/amiserial.c +++ b/drivers/tty/amiserial.c @@ -420,7 +420,7 @@ static void check_modem_status(struct serial_state *info) tty_hangup(port->tty); } } - if (port->flags & ASYNC_CTS_FLOW) { + if (tty_port_cts_enabled(port)) { if (port->tty->hw_stopped) { if (!(status & SER_CTS)) { #if (defined(SERIAL_DEBUG_INTR) || defined(SERIAL_DEBUG_FLOW)) |