Commit a07a70bc authored by Matwey V. Kornilov's avatar Matwey V. Kornilov Committed by Greg Kroah-Hartman

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: default avatarMatwey V. Kornilov <matwey@sai.msu.ru>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b85e5ed5
...@@ -1304,6 +1304,19 @@ static void autoconfig_irq(struct uart_8250_port *up) ...@@ -1304,6 +1304,19 @@ static void autoconfig_irq(struct uart_8250_port *up)
port->irq = (irq > 0) ? irq : 0; 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) static inline void __stop_tx(struct uart_8250_port *p)
{ {
if (p->ier & UART_IER_THRI) { if (p->ier & UART_IER_THRI) {
...@@ -1371,19 +1384,6 @@ static void serial8250_unthrottle(struct uart_port *port) ...@@ -1371,19 +1384,6 @@ static void serial8250_unthrottle(struct uart_port *port)
port->unthrottle(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) static void serial8250_disable_ms(struct uart_port *port)
{ {
struct uart_8250_port *up = struct uart_8250_port *up =
......
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