From: Tom Rini Date: Mon, 23 Mar 2026 19:53:06 +0000 (-0600) Subject: serial: omap: Fix "unused" warnings with SERIAL_PRESENT=n and OF_REAL=y X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3fe899fbeae62b8408c1e70532fe58cdab959dd0;p=thirdparty%2Fu-boot.git serial: omap: Fix "unused" warnings with SERIAL_PRESENT=n and OF_REAL=y 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 --- diff --git a/drivers/serial/serial_omap.c b/drivers/serial/serial_omap.c index 224d9cbf29d..8289336e08d 100644 --- a/drivers/serial/serial_omap.c +++ b/drivers/serial/serial_omap.c @@ -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);