diff options
author | Bill Richardson <wfrichar@chromium.org> | 2012-08-24 16:17:58 -0700 |
---|---|---|
committer | Gerrit <chrome-bot@google.com> | 2012-08-24 20:43:29 -0700 |
commit | 8516e5af74957b973fca5d0b67e578bf7ef057a9 (patch) | |
tree | 012822d879dc2b29ff177ed4ee7812a5208514ad /common | |
parent | 3799dcff81be83fdfcc4034c6657f8d4974800fc (diff) | |
download | chrome-ec-8516e5af74957b973fca5d0b67e578bf7ef057a9.tar.gz |
Fix return size error in lightbar host commands.
The response size was wrong. It should be right.
BUG=none
BRANCH=link
TEST=none
Build the lbplay tool, copy it to the DUT.
cd src/platform/ec
make BOARD=link
scp build/link/util/lbplay root@LINKIPADDR:/tmp/
Run /tmp/lbplay on DUT. It used to print a warning message. Now it doesn't.
The lightbar will glow green, then red (that's what lbplay does).
Change-Id: Iee02a026f08b6f761e5f28f20b79bcb9f4704a43
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/31403
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'common')
-rw-r--r-- | common/lightbar.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/common/lightbar.c b/common/lightbar.c index 81d77ad1a7..eb9c0014a8 100644 --- a/common/lightbar.c +++ b/common/lightbar.c @@ -1010,7 +1010,7 @@ static int lpc_cmd_lightbar(struct host_cmd_handler_args *args) switch (ptr->in.cmd) { case LIGHTBAR_CMD_DUMP: do_cmd_dump(ptr); - args->response_size = sizeof(struct ec_params_lightbar_cmd); + args->response_size = sizeof(ptr->out.dump); break; case LIGHTBAR_CMD_OFF: lightbar_off(); @@ -1040,7 +1040,7 @@ static int lpc_cmd_lightbar(struct host_cmd_handler_args *args) break; case LIGHTBAR_CMD_GET_SEQ: ptr->out.get_seq.num = st.cur_seq; - args->response_size = sizeof(struct ec_params_lightbar_cmd); + args->response_size = sizeof(ptr->out.get_seq); break; case LIGHTBAR_CMD_DEMO: demo_mode = ptr->in.demo.num ? 1 : 0; |