mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-28 05:28:56 -04:00
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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
374e01fa13
commit
e68d545004
@@ -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.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user