提交 e68d5450 编写于 作者: A Andy Shevchenko 提交者: Greg Kroah-Hartman

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: NIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20220806225643.40897-1-andriy.shevchenko@linux.intel.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 374e01fa
...@@ -943,7 +943,7 @@ static int pic32_uart_probe(struct platform_device *pdev) ...@@ -943,7 +943,7 @@ static int pic32_uart_probe(struct platform_device *pdev)
} }
#ifdef CONFIG_SERIAL_PIC32_CONSOLE #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, /* 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册