summaryrefslogtreecommitdiffstats
path: root/drivers/tty/cyclades.c
diff options
context:
space:
mode:
authorHuang Shijie <shijie8@gmail.com>2012-08-22 22:13:36 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-09-05 13:28:35 -0700
commitf21ec3d2d46e5f2ffc06f31fe2704fdcea7a58f3 (patch)
tree5d814cd687776374f960d3af2490187c3fbdf750 /drivers/tty/cyclades.c
parente5b57c037a656c694c7f3674f96352297a6ee7d8 (diff)
downloadop-kernel-dev-f21ec3d2d46e5f2ffc06f31fe2704fdcea7a58f3.zip
op-kernel-dev-f21ec3d2d46e5f2ffc06f31fe2704fdcea7a58f3.tar.gz
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/cyclades.c')
-rw-r--r--drivers/tty/cyclades.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/tty/cyclades.c b/drivers/tty/cyclades.c
index e3954da..0a6a0bc 100644
--- a/drivers/tty/cyclades.c
+++ b/drivers/tty/cyclades.c
@@ -727,7 +727,7 @@ static void cyy_chip_modem(struct cyclades_card *cinfo, int chip,
else
tty_hangup(tty);
}
- if ((mdm_change & CyCTS) && (info->port.flags & ASYNC_CTS_FLOW)) {
+ if ((mdm_change & CyCTS) && tty_port_cts_enabled(&info->port)) {
if (tty->hw_stopped) {
if (mdm_status & CyCTS) {
/* cy_start isn't used
OpenPOWER on IntegriCloud