Commit cfb7bdfc authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Greg Kroah-Hartman

serial: pic32_uart: Use uart_console() helper

Use uart_console() helper in instead of open coded variant.

Note, SERIAL_CORE_CONSOLE is selected by SERIAL_PIC32_CONSOLE,
thus no functional changes expected.
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20200311090027.64441-1-andriy.shevchenko@linux.intel.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 4cbd7814
...@@ -768,11 +768,6 @@ static int __init pic32_console_init(void) ...@@ -768,11 +768,6 @@ static int __init pic32_console_init(void)
} }
console_initcall(pic32_console_init); console_initcall(pic32_console_init);
static inline bool is_pic32_console_port(struct uart_port *port)
{
return port->cons && port->cons->index == port->line;
}
/* /*
* Late console initialization. * Late console initialization.
*/ */
...@@ -873,8 +868,7 @@ static int pic32_uart_probe(struct platform_device *pdev) ...@@ -873,8 +868,7 @@ static int pic32_uart_probe(struct platform_device *pdev)
} }
#ifdef CONFIG_SERIAL_PIC32_CONSOLE #ifdef CONFIG_SERIAL_PIC32_CONSOLE
if (is_pic32_console_port(port) && if (uart_console(port) && (pic32_console.flags & CON_ENABLED)) {
(pic32_console.flags & CON_ENABLED)) {
/* The peripheral clock has been enabled by console_setup, /* The peripheral clock has been enabled by console_setup,
* so disable it till the port is used. * so disable it till the port is used.
*/ */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment