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 <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Peter Hurley 2014-11-05 12:26:24 -05:00 committed by Greg Kroah-Hartman
parent 7e041abf79
commit 1256937f04

View file

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