]> git.baikalelectronics.ru Git - kernel.git/commit
TTY: fix close of uninitialised ports
authorJohan Hovold <jhovold@gmail.com>
Thu, 7 Mar 2013 14:55:53 +0000 (15:55 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 18 Mar 2013 23:27:54 +0000 (16:27 -0700)
commit4ef98640b1073d53a39616c9fb7d581b2855a2dc
treefedeac10644f0ac73734a9cdb91036fbf1eb09af
parent9ddb1541118ad4260e9808c309c8391d3f5a6e03
TTY: fix close of uninitialised ports

Make sure we do not make tty-driver callbacks or wait for port to drain
on uninitialised ports (e.g. when open failed) in
tty_port_close_start().

No callback, such as flush_buffer or wait_until_sent, needs to be made
on a port that has never been opened. Neither does it make much sense to
add drain delay for an uninitialised port.

Currently a drain delay of up to two seconds could be added when a tty
fails to open.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/tty_port.c