summaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/8250
diff options
context:
space:
mode:
authorMatwey V. Kornilov <matwey@sai.msu.ru>2016-02-01 21:09:20 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-02-06 22:23:26 -0800
commita07a70bcb72e4a766c8d3173986a773cef842d30 (patch)
treef4ac35699db5798a1d6d90349d07b755d369bdc2 /drivers/tty/serial/8250
parentb85e5ed5621b3a19f1ca20b30fd64803aa3d5ff8 (diff)
downloadblackbird-op-linux-a07a70bcb72e4a766c8d3173986a773cef842d30.tar.gz
blackbird-op-linux-a07a70bcb72e4a766c8d3173986a773cef842d30.zip
tty: Move serial8250_stop_rx() in front of serial8250_start_tx()
Software RS485 emultaion is to be added in the following commit. serial8250_start_tx() will need to refer serial8250_stop_rx(). Move serial8250_stop_rx() in front of serial8250_start_tx() in order to avoid function forward declaration. Signed-off-by: Matwey V. Kornilov <matwey@sai.msu.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/8250')
-rw-r--r--drivers/tty/serial/8250/8250_port.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/8250_port.c
index 0bd3c6baa300..04681e5745de 100644
--- a/drivers/tty/serial/8250/8250_port.c
+++ b/drivers/tty/serial/8250/8250_port.c
@@ -1304,6 +1304,19 @@ static void autoconfig_irq(struct uart_8250_port *up)
port->irq = (irq > 0) ? irq : 0;
}
+static void serial8250_stop_rx(struct uart_port *port)
+{
+ struct uart_8250_port *up = up_to_u8250p(port);
+
+ serial8250_rpm_get(up);
+
+ up->ier &= ~(UART_IER_RLSI | UART_IER_RDI);
+ up->port.read_status_mask &= ~UART_LSR_DR;
+ serial_port_out(port, UART_IER, up->ier);
+
+ serial8250_rpm_put(up);
+}
+
static inline void __stop_tx(struct uart_8250_port *p)
{
if (p->ier & UART_IER_THRI) {
@@ -1371,19 +1384,6 @@ static void serial8250_unthrottle(struct uart_port *port)
port->unthrottle(port);
}
-static void serial8250_stop_rx(struct uart_port *port)
-{
- struct uart_8250_port *up = up_to_u8250p(port);
-
- serial8250_rpm_get(up);
-
- up->ier &= ~(UART_IER_RLSI | UART_IER_RDI);
- up->port.read_status_mask &= ~UART_LSR_DR;
- serial_port_out(port, UART_IER, up->ier);
-
- serial8250_rpm_put(up);
-}
-
static void serial8250_disable_ms(struct uart_port *port)
{
struct uart_8250_port *up =
OpenPOWER on IntegriCloud