diff options
author | Furquan Shaikh <furquan@chromium.org> | 2017-11-15 07:41:08 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-11-15 13:23:34 -0800 |
commit | 6c92b0fcd08d00134f66d879d75a55d1cede5822 (patch) | |
tree | 447383bef3a30015d33ef336e5fc87478b983f82 /board/samus | |
parent | 5cee174602d8ea851cc434a2f07b71e21cbaa214 (diff) | |
download | chrome-ec-6c92b0fcd08d00134f66d879d75a55d1cede5822.tar.gz |
samus: Change the way host_set_single_event is used
In order to avoid runtime 64-bit left shift, check for extpower and
add two separate calls to host_set_single_event rather than
calculating the parameter at runtime. This avoids the requirement of
runtime logical shift for 64-bit.
BUG=b:69329196
BRANCH=None
TEST=make -j BOARD=samus
Change-Id: I64cacf6253878ed7d69f6b17baeb6c27c470378a
Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/771854
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'board/samus')
-rw-r--r-- | board/samus/extpower.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/board/samus/extpower.c b/board/samus/extpower.c index 513bed48cd..c2fabbd35e 100644 --- a/board/samus/extpower.c +++ b/board/samus/extpower.c @@ -415,8 +415,11 @@ void extpower_task(void) hook_notify(HOOK_AC_CHANGE); /* Forward notification to host */ - host_set_single_event(extpower ? - EC_HOST_EVENT_AC_CONNECTED : + if (extpower) + host_set_single_event( + EC_HOST_EVENT_AC_CONNECTED); + else + host_set_single_event( EC_HOST_EVENT_AC_DISCONNECTED); } } |