Commit 1256937f authored by Peter Hurley's avatar Peter Hurley Committed by Greg Kroah-Hartman

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: default avatarPeter Hurley <peter@hurleysoftware.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 7e041abf
......@@ -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;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment