summaryrefslogtreecommitdiffstats
path: root/drivers/tty
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2022-08-07 00:56:42 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-08-30 13:27:55 +0200
commite68d545004bd2edda8d8b60145d5dc81b2d5959e (patch)
tree5f8f5f4152d4a75c67d8ce191c85f8a2db26e4a4 /drivers/tty
parentserial: fsl_lpuart: Fix comment typo (diff)
downloadlinux-e68d545004bd2edda8d8b60145d5dc81b2d5959e.tar.xz
linux-e68d545004bd2edda8d8b60145d5dc81b2d5959e.zip
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 <ilpo.jarvinen@linux.intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20220806225643.40897-1-andriy.shevchenko@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/pic32_uart.c2
1 files changed, 1 insertions, 1 deletions
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.
*/