Commit 09b9d9e55f64259763c20217f7743dbeec9bb055

Authored by Masahiro Yamada
Committed by Tom Rini
1 parent d8da8298ad

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>

Showing 1 changed file with 10 additions and 11 deletions Side-by-side Diff

... ... @@ -202,11 +202,6 @@
202 202 if (!abort)
203 203 debug_bootkeys("key timeout\n");
204 204  
205   -#ifdef CONFIG_SILENT_CONSOLE
206   - if (abort)
207   - gd->flags &= ~GD_FLG_SILENT;
208   -#endif
209   -
210 205 return abort;
211 206 }
212 207  
213 208  
... ... @@ -263,18 +258,22 @@
263 258  
264 259 putc('\n');
265 260  
266   -#ifdef CONFIG_SILENT_CONSOLE
267   - if (abort)
268   - gd->flags &= ~GD_FLG_SILENT;
269   -#endif
270   -
271 261 return abort;
272 262 }
273 263 # endif /* CONFIG_AUTOBOOT_KEYED */
274 264  
275 265 static int abortboot(int bootdelay)
276 266 {
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;
278 277 }
279 278  
280 279 static void process_fdt_options(const void *blob)