]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
serial: omap: Fix "unused" warnings with SERIAL_PRESENT=n and OF_REAL=y
authorTom Rini <trini@konsulko.com>
Mon, 23 Mar 2026 19:53:06 +0000 (13:53 -0600)
committerTom Rini <trini@konsulko.com>
Tue, 7 Apr 2026 17:32:49 +0000 (11:32 -0600)
The definition of our ID table (and of_to_plat function) is guarded with
OF_REAL however the U_BOOT_DRIVER that would in turn use the table is
guarded with SERIAL_PRESENT. To avoid a potential warning we must also
guard both with SERIAL_PRESENT.

Signed-off-by: Tom Rini <trini@konsulko.com>
drivers/serial/serial_omap.c

index 224d9cbf29d7a7bcb190cbc6762f827a4cc0845c..8289336e08dcc5d1b3be5c556d0c16f12f8f6f21 100644 (file)
@@ -104,7 +104,7 @@ DEBUG_UART_FUNCS
 
 #if CONFIG_IS_ENABLED(DM_SERIAL)
 
-#if CONFIG_IS_ENABLED(OF_REAL)
+#if CONFIG_IS_ENABLED(OF_REAL) && CONFIG_IS_ENABLED(SERIAL_PRESENT)
 static int omap_serial_of_to_plat(struct udevice *dev)
 {
        struct ns16550_plat *plat = dev_get_plat(dev);