aboutsummaryrefslogtreecommitdiff
path: root/drivers/char/tty_port.c
diff options
context:
space:
mode:
authorAlan Cox <alan@redhat.com>2009-01-02 13:48:11 +0000
committerLinus Torvalds <torvalds@linux-foundation.org>2009-01-02 10:19:41 -0800
commit6ed1dbaeadd62a026a93aa3ac8680d2dfe9f96b3 (patch)
treeaf470015e92b5abbc510935b61f953015addb58a /drivers/char/tty_port.c
parent3969ffba71d39ced700d09d9cfde83174396299e (diff)
tty: Make epca use the port helpers
Now the locking is straight and the port kref usage is straight we can replace lots of chunks of code with the standard port helpers Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/char/tty_port.c')
-rw-r--r--drivers/char/tty_port.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/char/tty_port.c b/drivers/char/tty_port.c
index b3175f54fe0..b580fcf629f 100644
--- a/drivers/char/tty_port.c
+++ b/drivers/char/tty_port.c
@@ -286,7 +286,8 @@ int tty_port_close_start(struct tty_port *port, struct tty_struct *tty, struct f
port->flags |= ASYNC_CLOSING;
tty->closing = 1;
spin_unlock_irqrestore(&port->lock, flags);
- if (port->closing_wait != ASYNC_CLOSING_WAIT_NONE)
+ if (port->flags & ASYNC_INITIALIZED &&
+ port->closing_wait != ASYNC_CLOSING_WAIT_NONE)
tty_wait_until_sent(tty, port->closing_wait);
return 1;
}