summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Green <evgreen@chromium.org>2019-04-03 13:49:31 -0700
committerchrome-bot <chrome-bot@chromium.org>2019-04-09 06:19:48 -0700
commitc633a2d6c8267d704cda54d30996d4eeeae87989 (patch)
treea894a7836a151707e5db75d9df93c79b1a7b6c0e
parentb438ce1a026503d37ab14c537b15f3ae49cc44a2 (diff)
downloadchrome-ec-c633a2d6c8267d704cda54d30996d4eeeae87989.tar.gz
power: Init host_sleep_event resume_transitions
I had missed a piece of feedback from Karthik about initializing the sleep transitions member of the resume response to avoid returning uninitialized data from the EC. This is especially important if CONFIG_POWER_S0IX_FAILURE_DETECTION is not selected, because then it will *always* return uninitialized data. This drives the kernel nuts, since it has no way to know if that config is on or not. BUG=b:123716513 BRANCH=none TEST=Test suspend with kernel support for this message, and the EC config both on and off. Change-Id: Id35bfe2730327b08f451a4d84277a13e47380a61 Signed-off-by: Evan Green <evgreen@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1551687 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Reviewed-by: Furquan Shaikh <furquan@chromium.org> Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
-rw-r--r--power/common.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/power/common.c b/power/common.c
index 09501a16ec..13b66f5117 100644
--- a/power/common.c
+++ b/power/common.c
@@ -887,6 +887,7 @@ static int host_command_host_sleep_event(struct host_cmd_handler_args *args)
enum host_sleep_event state = p->sleep_event;
host_sleep_state = state;
+ ctx.sleep_transitions = 0;
switch (state) {
case HOST_SLEEP_EVENT_S3_SUSPEND:
case HOST_SLEEP_EVENT_S0IX_SUSPEND: