common/console.c: ensure GD_FLG_SILENT is set or cleared
authorChris Packham <judge.packham@gmail.com>
Fri, 23 Sep 2016 03:59:43 +0000 (15:59 +1200)
committerTom Rini <trini@konsulko.com>
Fri, 7 Oct 2016 14:26:29 +0000 (14:26 +0000)
commit43e0a3dec0a86a4e1a164f0b3839b6f1435c6685
tree8c6a2ba44601b7682e14f6ab5c08897c1ad23a6b
parent234600c1ca9fca800c8b41710cfc4fb7a30d887c
common/console.c: ensure GD_FLG_SILENT is set or cleared

When CONFIG_SILENT_CONSOLE is defined and the default environment has
silent=1 it is not possible for a user to make the console un-silent if
the environment is not available when console_init_f() is called (for
example because the environment is in SPI).

Add a new helper function console_update_silent() and call it from both
console_init_f() and console_init_r().

Signed-off-by: Chris Packham <judge.packham@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
common/console.c