tty: Remove tty_hung_up_p() tests from tty drivers' open()
[firefly-linux-kernel-4.4.55.git] / net / irda / ircomm / ircomm_tty.c
index 2ba8b9705bb75201715844105206ecfc3b480df7..61ceb4cdb4a262d56475f7a0ddb16d0e42672fc8 100644 (file)
@@ -320,8 +320,7 @@ static int ircomm_tty_block_til_ready(struct ircomm_tty_cb *self,
              __FILE__, __LINE__, tty->driver->name, port->count);
 
        spin_lock_irqsave(&port->lock, flags);
-       if (!tty_hung_up_p(filp))
-               port->count--;
+       port->count--;
        port->blocked_open++;
        spin_unlock_irqrestore(&port->lock, flags);
 
@@ -458,8 +457,7 @@ static int ircomm_tty_open(struct tty_struct *tty, struct file *filp)
        /*
         * If the port is the middle of closing, bail out now
         */
-       if (tty_hung_up_p(filp) ||
-           test_bit(ASYNCB_CLOSING, &self->port.flags)) {
+       if (test_bit(ASYNCB_CLOSING, &self->port.flags)) {
 
                /* Hm, why are we blocking on ASYNC_CLOSING if we
                 * do return -EAGAIN/-ERESTARTSYS below anyway?