From: Masahiro Yamada Date: Mon, 27 Jun 2016 07:23:03 +0000 (+0900) Subject: autoboot: move CONFIG_SILENT_CONSOLE handling X-Git-Tag: v2016.07-rc3~5 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=09b9d9e55f64259763c20217f7743dbeec9bb055;p=u-boot autoboot: move CONFIG_SILENT_CONSOLE handling Factor out the same code from the callees to the caller. Signed-off-by: Masahiro Yamada Reviewed-by: Stefan Roese Reviewed-by: Simon Glass Reviewed-by: Heiko Schocher --- 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)