Skip to contentSkip to conversation

serial: core: Fix ifdef for serial base console functions

PATCH New Tony Lindgren 1 participant 1 message Apr 13, 2024 TTY layer and serial drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 serial: core: Fix ifdef for serial base console functions

If CONFIG_SERIAL_CORE_CONSOLE is not set, we get build errors. Let's fix the issue by moving the endif after the serial base console functions.

Fixes 4547cd76f08a ("serial: 8250: Fix add preferred console for serial8250_isa_init_ports()")
---
 drivers/tty/serial/serial_base_bus.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/tty/serial/serial_base_bus.c +2 -2
@@ -219,8 +219,6 @@ static int serial_base_add_one_prefcon(const char *match, const char *dev_name,
 	return ret;
 }
 
-#endif
-
 #ifdef __sparc__
 
 /* Handle Sparc ttya and ttyb options as done in console_setup() */
@@ -319,6 +317,8 @@ int serial_base_add_preferred_console(struct uart_driver *drv,
 	return serial_base_add_one_prefcon(port_match, drv->dev_name, port->line);
 }
 
+#endif
+
 #ifdef CONFIG_SERIAL_8250_CONSOLE
 
 /*
Signature · 1 line
2.44.0