From c633a2d6c8267d704cda54d30996d4eeeae87989 Mon Sep 17 00:00:00 2001 From: Evan Green Date: Wed, 3 Apr 2019 13:49:31 -0700 Subject: 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 Reviewed-on: https://chromium-review.googlesource.com/1551687 Commit-Ready: ChromeOS CL Exonerator Bot Reviewed-by: Tim Wawrzynczak Reviewed-by: Furquan Shaikh Reviewed-by: Paul Fagerburg --- power/common.c | 1 + 1 file changed, 1 insertion(+) (limited to 'power') 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: -- cgit v1.2.1