summaryrefslogtreecommitdiff
path: root/drivers/tty/serial/imx.c
diff options
context:
space:
mode:
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>2016-03-24 13:24:23 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-04-30 16:26:55 (GMT)
commit9ec8efe94b5c6a797aa5bceca337373d310f9c2c (patch)
treee16cc1c80d81d83cfa4005a6415737e283f1d309 /drivers/tty/serial/imx.c
parent16804d68bfaa7f5f5a73ab4a016ffeba33e87770 (diff)
downloadlinux-9ec8efe94b5c6a797aa5bceca337373d310f9c2c.tar.xz
serial: imx: only count 0->1 transitions for RNG
According to tty_ioctl(4) (from man-pages 4.04) the rng member only counts 0->1 transitions. For the other signals (DSR, CD, CTS) both edges are supposed to be counted. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/imx.c')
-rw-r--r--drivers/tty/serial/imx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index aa07301..8ec8127 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -887,7 +887,7 @@ static void imx_mctrl_check(struct imx_port *sport)
sport->old_status = status;
- if (changed & TIOCM_RI)
+ if (changed & TIOCM_RI && status & TIOCM_RI)
sport->port.icount.rng++;
if (changed & TIOCM_DSR)
sport->port.icount.dsr++;