From 8516e5af74957b973fca5d0b67e578bf7ef057a9 Mon Sep 17 00:00:00 2001 From: Bill Richardson Date: Fri, 24 Aug 2012 16:17:58 -0700 Subject: 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 Reviewed-on: https://gerrit.chromium.org/gerrit/31403 Reviewed-by: Randall Spangler --- common/lightbar.c | 4 ++-- 1 file 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; -- cgit v1.2.1