tty: serial_core: convert uart_close to use tty_port_close
authorRob Herring <robh@kernel.org>
Mon, 22 Aug 2016 22:39:10 +0000 (17:39 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 31 Aug 2016 13:42:28 +0000 (15:42 +0200)
commit761ed4a94582ab291aa24dcbea4e01e8936488c8
treec4274fdb9bb559d7da5fbdd38c57ff7fcfb2fc7f
parentb3b57646186400d4f54652ab7bbf55f5764d9467
tty: serial_core: convert uart_close to use tty_port_close

tty_port_close handles much of the common parts of tty close. Convert
uart_close to use it and move the serial_core specific parts into
tty_port.shutdown function. This will be needed to use tty_port functions
directly from in kernel clients.

This change causes ops->stop_rx() to be called after uart_wait_until_sent()
is called which I think should be fine. Otherwise, the sequence of the
close should be the same.

Cc: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Rob Herring <robh@kernel.org>
Acked-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/serial_core.c