[PATCH] serial: 8250_hub6: Fix double definition for hub6_match_port()
From: Uwe Kleine-König (The Capable Hub)
Date: Mon Jul 20 2026 - 04:11:59 EST
With CONFIG_SERIAL_8250_HUB6 configured as module
(CONFIG_SERIAL_8250_HUB6=m) the cpp symbol CONFIG_SERIAL_8250_HUB6 isn't
defined (only CONFIG_SERIAL_8250_HUB6_MODULE is). In this case
hub6_match_port() is defined in drivers/tty/serial/8250/8250.h as static
inline and in drivers/tty/serial/8250/8250_hub6.c as normal function.
Use IS_ENABLED() to also handle the modular case correctly.
Fixes: 3d406299d882 ("serial: 8250_hub6: add hub6_match_port()")
Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@xxxxxxxxxxxx>
---
drivers/tty/serial/8250/8250.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/tty/serial/8250/8250.h b/drivers/tty/serial/8250/8250.h
index 9d1068d0489d..fb9a7117d145 100644
--- a/drivers/tty/serial/8250/8250.h
+++ b/drivers/tty/serial/8250/8250.h
@@ -334,7 +334,7 @@ int fintek_8250_probe(struct uart_8250_port *uart);
static inline int fintek_8250_probe(struct uart_8250_port *uart) { return 0; }
#endif
-#ifdef CONFIG_SERIAL_8250_HUB6
+#if IS_ENABLED(CONFIG_SERIAL_8250_HUB6)
bool hub6_match_port(const struct uart_port *port1, const struct uart_port *port2);
#else
static inline bool hub6_match_port(const struct uart_port *port1, const struct uart_port *port2)
base-commit: 0718283ab28bc3907e10b61a6b4be6fefa1cbb2f
--
2.55.0.11.g153666a7d9bb