diff options
author | Che-Liang Chiou <clchiou@chromium.org> | 2011-06-22 17:24:22 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2011-08-29 10:39:32 -0700 |
commit | 014ac08f3a445ce623fff16d7073e4e1a82bf3a7 (patch) | |
tree | 0a435390cd6f1244349884619a3d400f60342316 | |
parent | f7cf3607b101d8264eb8f7c3ff4d332ff6eda262 (diff) |
CHROMIUM: initialize global variable current_screen
It is unfortunate that the constant SCREEN_BLANK is not zero; we have to
explicitly initialize current_screen to SCREEN_BLANK, and cannot rely on
that it is in BSS section and is initialized to zero.
BUG=chromium-os:16508
TEST=build cleanly
Change-Id: I27a063687454821f3f264b0c5631e575fe31af6e
Reviewed-on: http://gerrit.chromium.org/gerrit/3065
Tested-by: Che-Liang Chiou <clchiou@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
-rw-r--r-- | common/cmd_cros_onestop_firmware.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/common/cmd_cros_onestop_firmware.c b/common/cmd_cros_onestop_firmware.c index a9a8367d2f3..5b1d288d57f 100644 --- a/common/cmd_cros_onestop_firmware.c +++ b/common/cmd_cros_onestop_firmware.c @@ -154,6 +154,9 @@ static uint32_t init_internal_state(void) memset(&_state, '\0', sizeof(_state)); + /* sad enough, SCREEN_BLANK != 0 */ + _state.current_screen = SCREEN_BLANK; + /* malloc spaces for buffers */ _state.gbb_data = malloc(CONFIG_LENGTH_GBB); if (!_state.gbb_data) { @@ -347,6 +350,8 @@ static void clear_screen(void) static void show_screen(ScreenIndex screen) { + VBDEBUG(PREFIX "show_screen: %d\n", (int) screen); + if (_state.current_screen == screen) return; |