[PATCH -next 1/9] tty: Replace open-coded test with tty_hung_up_p()

From: Peter Hurley
Date: Wed Nov 05 2014 - 12:29:40 EST


tty_hung_up_p() is equivalent to the open-coded test in tty_open().

Signed-off-by: Peter Hurley <peter@xxxxxxxxxxxxxxxxxx>
---
drivers/tty/tty_io.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/tty_io.c b/drivers/tty/tty_io.c
index 4bd48f7..1262368 100644
--- a/drivers/tty/tty_io.c
+++ b/drivers/tty/tty_io.c
@@ -2129,7 +2129,7 @@ retry_open:
/*
* Need to reset f_op in case a hangup happened.
*/
- if (filp->f_op == &hung_up_tty_fops)
+ if (tty_hung_up_p(filp))
filp->f_op = &tty_fops;
goto retry_open;
}
--
2.1.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/