]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
serial-uclass: fix build warning
authorHeiko Schocher <hs@denx.de>
Wed, 2 Feb 2022 12:55:19 +0000 (13:55 +0100)
committerSimon Glass <sjg@chromium.org>
Wed, 9 Feb 2022 19:30:13 +0000 (12:30 -0700)
if CONFIG_DM_STDIO is defined but SERIAL_PRESENT not,
gcc drops warnings for serial_stub_* functions
that they are defined but not used.

Fix it.

Signed-off-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
drivers/serial/serial-uclass.c

index 96a1cb65ba2777c9e58bd2ef749727db50421ce5..362cedd9552489319329b9743364f72ef8ffdcd6 100644 (file)
@@ -357,7 +357,6 @@ static void serial_stub_putc(struct stdio_dev *sdev, const char ch)
 {
        _serial_putc(sdev->priv, ch);
 }
-#endif
 
 static void serial_stub_puts(struct stdio_dev *sdev, const char *str)
 {
@@ -374,6 +373,7 @@ static int serial_stub_tstc(struct stdio_dev *sdev)
        return _serial_tstc(sdev->priv);
 }
 #endif
+#endif
 
 /**
  * on_baudrate() - Update the actual baudrate when the env var changes