From: Andy Shevchenko Date: Sat, 6 Aug 2022 22:56:42 +0000 (+0300) Subject: serial: pic32_uart: Utilize uart_console_enabled() X-Git-Tag: baikal/mips/sdk6.1~4689^2~93 X-Git-Url: https://git.baikalelectronics.ru/?a=commitdiff_plain;h=3afb9eed80f29b3c91a579db9017b7f96bfc1d55;p=kernel.git serial: pic32_uart: Utilize uart_console_enabled() The serial core already provides a helper to check if the given port is an enabled console. Utilize it instead of open coded variant. Reviewed-by: Ilpo Järvinen Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220806225643.40897-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/tty/serial/pic32_uart.c b/drivers/tty/serial/pic32_uart.c index f418f1de66b35..1562c2a484671 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. */