Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

serial: 8250_ingenic: drop #if conditional surrounding earlycon code

The #if defined(CONFIG_SERIAL_EARLYCON) && !defined(MODULE)
conditional has been added to the OF_EARLYCON_DECLARE() define.

The same conditional can be dropped from 8250_ingenic.c because
the unused symbols will be marked as __maybe_unsed.
Also, the Kconfig dependency can become much simpler.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Masahiro Yamada and committed by
Greg Kroah-Hartman
755dd8aa ae73975f

+1 -3
-2
drivers/tty/serial/8250/8250_ingenic.c
··· 48 48 #define UART_MCR_MDCE BIT(7) 49 49 #define UART_MCR_FCM BIT(6) 50 50 51 - #if defined(CONFIG_SERIAL_EARLYCON) && !defined(MODULE) 52 51 static struct earlycon_device *early_device; 53 52 54 53 static uint8_t __init early_in(struct uart_port *port, int offset) ··· 140 141 EARLYCON_DECLARE(jz4780_uart, ingenic_early_console_setup); 141 142 OF_EARLYCON_DECLARE(jz4780_uart, "ingenic,jz4780-uart", 142 143 ingenic_early_console_setup); 143 - #endif /* CONFIG_SERIAL_EARLYCON */ 144 144 145 145 static void ingenic_uart_serial_out(struct uart_port *p, int offset, int value) 146 146 {
+1 -1
drivers/tty/serial/8250/Kconfig
··· 397 397 config SERIAL_8250_INGENIC 398 398 tristate "Support for Ingenic SoC serial ports" 399 399 depends on SERIAL_8250 400 - depends on (OF_FLATTREE && SERIAL_8250_CONSOLE) || !SERIAL_EARLYCON 400 + depends on OF_FLATTREE 401 401 depends on MIPS || COMPILE_TEST 402 402 help 403 403 If you have a system using an Ingenic SoC and wish to make use of