Skip to content

Commit 09b9d9e

Browse files
masahir0ytrini
authored andcommitted
autoboot: move CONFIG_SILENT_CONSOLE handling
Factor out the same code from the callees to the caller. Signed-off-by: Masahiro Yamada <[email protected]> Reviewed-by: Stefan Roese <[email protected]> Reviewed-by: Simon Glass <[email protected]> Reviewed-by: Heiko Schocher <[email protected]>
1 parent d8da829 commit 09b9d9e

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

common/autoboot.c

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -202,11 +202,6 @@ static int __abortboot(int bootdelay)
202202
if (!abort)
203203
debug_bootkeys("key timeout\n");
204204

205-
#ifdef CONFIG_SILENT_CONSOLE
206-
if (abort)
207-
gd->flags &= ~GD_FLG_SILENT;
208-
#endif
209-
210205
return abort;
211206
}
212207

@@ -263,18 +258,22 @@ static int __abortboot(int bootdelay)
263258

264259
putc('\n');
265260

266-
#ifdef CONFIG_SILENT_CONSOLE
267-
if (abort)
268-
gd->flags &= ~GD_FLG_SILENT;
269-
#endif
270-
271261
return abort;
272262
}
273263
# endif /* CONFIG_AUTOBOOT_KEYED */
274264

275265
static int abortboot(int bootdelay)
276266
{
277-
return __abortboot(bootdelay);
267+
int abort;
268+
269+
abort = __abortboot(bootdelay);
270+
271+
#ifdef CONFIG_SILENT_CONSOLE
272+
if (abort)
273+
gd->flags &= ~GD_FLG_SILENT;
274+
#endif
275+
276+
return abort;
278277
}
279278

280279
static void process_fdt_options(const void *blob)

0 commit comments

Comments
 (0)