diff options
author | Randall Spangler <rspangler@chromium.org> | 2012-07-22 12:20:09 -0700 |
---|---|---|
committer | Gerrit <chrome-bot@google.com> | 2012-07-22 13:17:04 -0700 |
commit | ee71c0ae1b8f34b955e466e2c84d7fd95c55ace3 (patch) | |
tree | 1d5f1c70d3efa707bd3d156cd7b02c98342c5bce /common/host_command.c | |
parent | 5fdf655b12f161f69b28e75f285a99f08a97d5f9 (diff) | |
download | chrome-ec-ee71c0ae1b8f34b955e466e2c84d7fd95c55ace3.tar.gz |
Revert "host_command: Add send_result() to the arg structure"
This reverts commit 18db93b25b05c871826fd1853a33a560e64ed247
Breaks link checksums.
Change-Id: Ieeb278b7d4da0600bdc9ced1476b67f23abce1a1
Reviewed-on: https://gerrit.chromium.org/gerrit/28136
Commit-Ready: Randall Spangler <rspangler@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Tested-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'common/host_command.c')
-rw-r--r-- | common/host_command.c | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/common/host_command.c b/common/host_command.c index 1a1c21fd40..1420e79434 100644 --- a/common/host_command.c +++ b/common/host_command.c @@ -49,19 +49,15 @@ void host_command_received(struct host_cmd_handler_args *args) if (args->command == EC_CMD_REBOOT) { system_reset(SYSTEM_RESET_HARD); /* Reset should never return; if it does, post an error */ - args->result = EC_RES_ERROR; + host_send_response(EC_RES_ERROR); + return; } - /* If the driver has signalled an error, send the response now */ - if (args->result) { - args->send_response(args); - } else { - /* Save the command */ - pending_args = args; + /* Save the command */ + pending_args = args; - /* Wake up the task to handle the command */ - task_set_event(TASK_ID_HOSTCMD, TASK_EVENT_CMD_PENDING, 0); - } + /* Wake up the task to handle the command */ + task_set_event(TASK_ID_HOSTCMD, TASK_EVENT_CMD_PENDING, 0); } /* @@ -228,9 +224,8 @@ void host_command_task(void) int evt = task_wait_event(-1); /* process it */ if ((evt & TASK_EVENT_CMD_PENDING) && pending_args) { - pending_args->result = - host_command_process(pending_args); - pending_args->send_response(pending_args); + enum ec_status res = host_command_process(pending_args); + host_send_response(res); } } } |