diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2016-06-27 16:23:03 +0900 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2016-07-01 17:42:56 -0400 |
commit | 09b9d9e55f64259763c20217f7743dbeec9bb055 (patch) | |
tree | 655155b29dfdb9679f5b01403370186a1e76c6ea | |
parent | d8da8298ad9b5a379d6fb7f079a3a1a591147a5e (diff) | |
download | u-boot-09b9d9e55f64259763c20217f7743dbeec9bb055.tar.gz u-boot-09b9d9e55f64259763c20217f7743dbeec9bb055.tar.bz2 u-boot-09b9d9e55f64259763c20217f7743dbeec9bb055.zip |
autoboot: move CONFIG_SILENT_CONSOLE handling
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>
-rw-r--r-- | common/autoboot.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/common/autoboot.c b/common/autoboot.c index eb31c8875d..fb131395aa 100644 --- a/common/autoboot.c +++ b/common/autoboot.c @@ -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) |