Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752775AbbLLLYe (ORCPT ); Sat, 12 Dec 2015 06:24:34 -0500 Received: from mail-lf0-f44.google.com ([209.85.215.44]:36616 "EHLO mail-lf0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752005AbbLLLXp (ORCPT ); Sat, 12 Dec 2015 06:23:45 -0500 From: "Matwey V. Kornilov" To: gregkh@linuxfoundation.org, jslaby@suse.com, peter@hurleysoftware.com, andy.shevchenko@gmail.com, gnomes@lxorguk.ukuu.org.uk Cc: "Matwey V. Kornilov" , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org Subject: [PATCH v5 1/3] tty: Move serial8250_stop_rx in front of serial8250_start_tx Date: Sat, 12 Dec 2015 14:23:34 +0300 Message-Id: <1449919416-1980-2-git-send-email-matwey@sai.msu.ru> X-Mailer: git-send-email 2.6.3 In-Reply-To: <1449919416-1980-1-git-send-email-matwey@sai.msu.ru> References: <1449919416-1980-1-git-send-email-matwey@sai.msu.ru> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1891 Lines: 62 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 --- drivers/tty/serial/8250/8250_port.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/8250_port.c index 0bbf340..8ad0b2d 100644 --- a/drivers/tty/serial/8250/8250_port.c +++ b/drivers/tty/serial/8250/8250_port.c @@ -1280,6 +1280,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) { @@ -1347,19 +1360,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 = -- 2.6.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/