Commit 424cc039 authored by Jiri Slaby's avatar Jiri Slaby Committed by Greg Kroah-Hartman

TTY: use tty_wait_until_sent_from_close in tty_port_close_start

Let's use the newly added helper to avoid stalls in drivers which are
already ported to tty_port helpers.

We have to ensure here, that there is no user of tty_port_close_start
and tty_port_close which holds port->mutex (or other) lock over them.
And sure, there is none.
Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent a57a7bf3
...@@ -350,7 +350,7 @@ int tty_port_close_start(struct tty_port *port, ...@@ -350,7 +350,7 @@ int tty_port_close_start(struct tty_port *port,
tty_driver_flush_buffer(tty); tty_driver_flush_buffer(tty);
if (test_bit(ASYNCB_INITIALIZED, &port->flags) && if (test_bit(ASYNCB_INITIALIZED, &port->flags) &&
port->closing_wait != ASYNC_CLOSING_WAIT_NONE) port->closing_wait != ASYNC_CLOSING_WAIT_NONE)
tty_wait_until_sent(tty, port->closing_wait); tty_wait_until_sent_from_close(tty, port->closing_wait);
if (port->drain_delay) { if (port->drain_delay) {
unsigned int bps = tty_get_baud_rate(tty); unsigned int bps = tty_get_baud_rate(tty);
long timeout; long timeout;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment