]> git.sur5r.net Git - u-boot/commitdiff
autoboot: move CONFIG_SILENT_CONSOLE handling
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Mon, 27 Jun 2016 07:23:03 +0000 (16:23 +0900)
committerTom Rini <trini@konsulko.com>
Fri, 1 Jul 2016 21:42:56 +0000 (17:42 -0400)
Factor out the same code from the callees to the caller.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heiko Schocher <hs@denx.de>
common/autoboot.c

index eb31c8875d9a0cfcc683fad80ec267fb20d7b742..fb131395aac9b552f87cb1f7cf589228b92b3293 100644 (file)
@@ -202,11 +202,6 @@ static int __abortboot(int bootdelay)
        if (!abort)
                debug_bootkeys("key timeout\n");
 
-#ifdef CONFIG_SILENT_CONSOLE
-       if (abort)
-               gd->flags &= ~GD_FLG_SILENT;
-#endif
-
        return abort;
 }
 
@@ -263,18 +258,22 @@ static int __abortboot(int bootdelay)
 
        putc('\n');
 
-#ifdef CONFIG_SILENT_CONSOLE
-       if (abort)
-               gd->flags &= ~GD_FLG_SILENT;
-#endif
-
        return abort;
 }
 # endif        /* CONFIG_AUTOBOOT_KEYED */
 
 static int abortboot(int bootdelay)
 {
-       return __abortboot(bootdelay);
+       int abort;
+
+       abort = __abortboot(bootdelay);
+
+#ifdef CONFIG_SILENT_CONSOLE
+       if (abort)
+               gd->flags &= ~GD_FLG_SILENT;
+#endif
+
+       return abort;
 }
 
 static void process_fdt_options(const void *blob)