From 1256937f0438786cb19a7cb716b12025b30052e9 Mon Sep 17 00:00:00 2001 From: Peter Hurley Date: Wed, 5 Nov 2014 12:26:24 -0500 Subject: [PATCH] tty: Replace open-coded test with tty_hung_up_p() tty_hung_up_p() is equivalent to the open-coded test in tty_open(). Signed-off-by: Peter Hurley Signed-off-by: Greg Kroah-Hartman --- 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 4bd48f79b94b..1262368443f4 100644 --- a/drivers/tty/tty_io.c +++ b/drivers/tty/tty_io.c @@ -2129,7 +2129,7 @@ static int tty_open(struct inode *inode, struct file *filp) /* * 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.45.2