summaryrefslogtreecommitdiff
path: root/drivers/char/tty_port.c
diff options
context:
space:
mode:
authorAlan Cox <alan@redhat.com>2009-01-02 16:48:11 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2009-01-02 21:19:41 +0300
commit6ed1dbaeadd62a026a93aa3ac8680d2dfe9f96b3 (patch)
treeaf470015e92b5abbc510935b61f953015addb58a /drivers/char/tty_port.c
parent3969ffba71d39ced700d09d9cfde83174396299e (diff)
downloadlinux-6ed1dbaeadd62a026a93aa3ac8680d2dfe9f96b3.tar.xz
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 b3175f54fe05..b580fcf629f8 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;
}