diff options
author | Evan Green <evgreen@chromium.org> | 2021-07-28 10:00:37 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-08-02 15:43:10 +0000 |
commit | 515883d1cf14cbdcbf389736a9b67293d1e9cfd2 (patch) | |
tree | cfb9da9a5aaa1aebf7428949fd08e162dd400b6e /test/sbs_charging_v2.c | |
parent | 8f5bab3aaf97f7a2b9778a3ebdbde83c86a4c3e2 (diff) | |
download | chrome-ec-515883d1cf14cbdcbf389736a9b67293d1e9cfd2.tar.gz |
test: Fix sbs_charging_v2's charge_control() cmd version
charge_control() was sending EC_CMD_CHARGE_CONTROL version 2, but
leaving params.cmd uninitialized. Apparently we were just getting lucky.
I did not get as lucky when compiling in 32-bit mode. This test is
clearly sending the version 1 form of the command, so make the version
number match the intent so the EC doesn't fail the command.
BUG=b:179062230
BRANCH=none
TEST=make -j runhosttests BOARD=host on x86_64 and i686
Signed-off-by: Evan Green <evgreen@chromium.org>
Change-Id: Ie440ff825e1125bb50b4ac2477ba983e00ef303e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3059229
Reviewed-by: Diana Z <dzigterman@chromium.org>
Diffstat (limited to 'test/sbs_charging_v2.c')
-rw-r--r-- | test/sbs_charging_v2.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/sbs_charging_v2.c b/test/sbs_charging_v2.c index 2ec4299b33..20722b563a 100644 --- a/test/sbs_charging_v2.c +++ b/test/sbs_charging_v2.c @@ -133,7 +133,7 @@ static int charge_control(enum ec_charge_control_mode mode) { struct ec_params_charge_control params; params.mode = mode; - return test_send_host_command(EC_CMD_CHARGE_CONTROL, 2, ¶ms, + return test_send_host_command(EC_CMD_CHARGE_CONTROL, 1, ¶ms, sizeof(params), NULL, 0); } |