USB: serial: remove hupping check from tiocmiwait
authorJohan Hovold <jhovold@gmail.com>
Wed, 26 Jun 2013 14:47:21 +0000 (16:47 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 23 Jul 2013 23:21:50 +0000 (16:21 -0700)
Since commit 31ca020b ("TTY: wake up processes last at hangup") there no
longer any need to check the hupping flag in the generic tiocmiwait
implementation, so remove it.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/serial/generic.c

index ba45170c78e5f601ec6b2c57f5f05600247803f4..1f31e6b4c2518f262a263bbefdddf5fda6ba9cb6 100644 (file)
@@ -460,12 +460,7 @@ static bool usb_serial_generic_msr_changed(struct tty_struct *tty,
        /*
         * Use tty-port initialised flag to detect all hangups including the
         * one generated at USB-device disconnect.
-        *
-        * FIXME: Remove hupping check once tty_port_hangup calls shutdown
-        *        (which clears the initialised flag) before wake up.
         */
-       if (test_bit(TTY_HUPPING, &tty->flags))
-               return true;
        if (!test_bit(ASYNCB_INITIALIZED, &port->port.flags))
                return true;
 
@@ -496,12 +491,8 @@ int usb_serial_generic_tiocmiwait(struct tty_struct *tty, unsigned long arg)
 
        ret = wait_event_interruptible(port->port.delta_msr_wait,
                        usb_serial_generic_msr_changed(tty, arg, &cnow));
-       if (!ret) {
-               if (test_bit(TTY_HUPPING, &tty->flags))
-                       ret = -EIO;
-               if (!test_bit(ASYNCB_INITIALIZED, &port->port.flags))
-                       ret = -EIO;
-       }
+       if (!ret && !test_bit(ASYNCB_INITIALIZED, &port->port.flags))
+               ret = -EIO;
 
        return ret;
 }