[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190729195226.8862-18-andrew.smirnov@gmail.com>
Date: Mon, 29 Jul 2019 12:52:19 -0700
From: Andrey Smirnov <andrew.smirnov@...il.com>
To: linux-serial@...r.kernel.org
Cc: Andrey Smirnov <andrew.smirnov@...il.com>,
Stefan Agner <stefan@...er.ch>,
Bhuvanchandra DV <bhuvanchandra.dv@...adex.com>,
Chris Healy <cphealy@...il.com>,
Cory Tusar <cory.tusar@....aero>,
Lucas Stach <l.stach@...gutronix.de>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Jiri Slaby <jslaby@...e.com>, linux-imx@....com,
linux-kernel@...r.kernel.org
Subject: [PATCH 17/24] tty: serial: fsl_lpuart: Drop unnecessary lpuart*_stop_tx()
By the time lpuart_shutdown() calls lpuart_stop_tx() UARTCR2_TE and
UARTCR2_TIE (which the latter will clear) are already cleared, so that
function call should effectively be a no-op. Moreso, lpuart_stop_tx()
is expected to be executed with port spinlock held, which the caller
doesn't. Given all that, drop the call to lpuart_stop_tx() in
lpuart_shutdown().
In case of lpuart32_shutdown()/lpuart32_stop_tx(), TIE won't even be
set if lpuart_dma_tx_use is true. Drop it there as well.
Signed-off-by: Andrey Smirnov <andrew.smirnov@...il.com>
Cc: Stefan Agner <stefan@...er.ch>
Cc: Bhuvanchandra DV <bhuvanchandra.dv@...adex.com>
Cc: Chris Healy <cphealy@...il.com>
Cc: Cory Tusar <cory.tusar@....aero>
Cc: Lucas Stach <l.stach@...gutronix.de>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: Jiri Slaby <jslaby@...e.com>
Cc: linux-imx@....com
Cc: linux-serial@...r.kernel.org
Cc: linux-kernel@...r.kernel.org
---
drivers/tty/serial/fsl_lpuart.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c
index a090b93211e3..67f196f66533 100644
--- a/drivers/tty/serial/fsl_lpuart.c
+++ b/drivers/tty/serial/fsl_lpuart.c
@@ -1575,8 +1575,6 @@ static void lpuart_shutdown(struct uart_port *port)
sport->dma_tx_in_progress = false;
dmaengine_terminate_all(sport->dma_tx_chan);
}
-
- lpuart_stop_tx(port);
}
}
@@ -1608,8 +1606,6 @@ static void lpuart32_shutdown(struct uart_port *port)
sport->dma_tx_in_progress = false;
dmaengine_terminate_all(sport->dma_tx_chan);
}
-
- lpuart32_stop_tx(port);
}
}
--
2.21.0
Powered by blists - more mailing lists