public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 1/2] serial: pic32_uart: Utilize uart_console_enabled()
@ 2022-08-06 22:56 Andy Shevchenko
  2022-08-06 22:56 ` [PATCH v1 2/2] serial: pic32_uart: Convert to use GPIO descriptors Andy Shevchenko
  2022-08-10  8:26 ` [PATCH v1 1/2] serial: pic32_uart: Utilize uart_console_enabled() Ilpo Järvinen
  0 siblings, 2 replies; 3+ messages in thread
From: Andy Shevchenko @ 2022-08-06 22:56 UTC (permalink / raw)
  To: Jiri Slaby, Greg Kroah-Hartman, linux-serial, linux-kernel
  Cc: Andy Shevchenko

The serial core already provides a helper to check if the given port
is an enabled console. Utilize it instead of open coded variant.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/tty/serial/pic32_uart.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/pic32_uart.c b/drivers/tty/serial/pic32_uart.c
index f418f1de66b3..1562c2a48467 100644
--- a/drivers/tty/serial/pic32_uart.c
+++ b/drivers/tty/serial/pic32_uart.c
@@ -943,7 +943,7 @@ static int pic32_uart_probe(struct platform_device *pdev)
 	}
 
 #ifdef CONFIG_SERIAL_PIC32_CONSOLE
-	if (uart_console(port) && (pic32_console.flags & CON_ENABLED)) {
+	if (uart_console_enabled(port)) {
 		/* The peripheral clock has been enabled by console_setup,
 		 * so disable it till the port is used.
 		 */
-- 
2.35.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-08-10  8:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-06 22:56 [PATCH v1 1/2] serial: pic32_uart: Utilize uart_console_enabled() Andy Shevchenko
2022-08-06 22:56 ` [PATCH v1 2/2] serial: pic32_uart: Convert to use GPIO descriptors Andy Shevchenko
2022-08-10  8:26 ` [PATCH v1 1/2] serial: pic32_uart: Utilize uart_console_enabled() Ilpo Järvinen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox