tty: localise the lock
[deliverable/linux.git] / drivers / tty / tty_port.c
index edcb827c1286d6f0db94abc36bfc628324dc0453..5246763cff0c8db3618418a89fc1bff4c6df3f89 100644 (file)
@@ -239,7 +239,7 @@ int tty_port_block_til_ready(struct tty_port *port,
 
        /* block if port is in the process of being closed */
        if (tty_hung_up_p(filp) || port->flags & ASYNC_CLOSING) {
-               wait_event_interruptible_tty(port->close_wait,
+               wait_event_interruptible_tty(tty, port->close_wait,
                                !(port->flags & ASYNC_CLOSING));
                if (port->flags & ASYNC_HUP_NOTIFY)
                        return -EAGAIN;
@@ -305,9 +305,9 @@ int tty_port_block_til_ready(struct tty_port *port,
                        retval = -ERESTARTSYS;
                        break;
                }
-               tty_unlock();
+               tty_unlock(tty);
                schedule();
-               tty_lock();
+               tty_lock(tty);
        }
        finish_wait(&port->open_wait, &wait);
 
This page took 0.02682 seconds and 5 git commands to generate.