tty: Replace open-coded test with tty_hung_up_p()
authorPeter Hurley <peter@hurleysoftware.com>
Wed, 5 Nov 2014 17:26:24 +0000 (12:26 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 6 Nov 2014 04:18:30 +0000 (20:18 -0800)
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>
drivers/tty/tty_io.c

index 4bd48f79b94bd0bc9f2e8a409dfecf308f0e59b2..1262368443f45d68efc50412079678f0751f3d3f 100644 (file)
@@ -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;
        }