2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-22 20:23:57 +08:00

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>
This commit is contained in:
Uwe Kleine-König 2016-03-24 14:24:23 +01:00 committed by Greg Kroah-Hartman
parent 16804d68bf
commit 9ec8efe94b

View File

@ -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++;