提交 1256937f 编写于 作者: P Peter Hurley 提交者: 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: NPeter Hurley <peter@hurleysoftware.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册