summaryrefslogtreecommitdiff
path: root/common/gpio_commands.c
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2012-07-26 11:12:31 -0700
committerGerrit <chrome-bot@google.com>2012-07-26 16:25:34 -0700
commit247fdaf13d7d317465d6d04b015a309721e599a9 (patch)
tree6eef0fb1a07133135f0529a6e26635b99428b6ea /common/gpio_commands.c
parentd0d50b6da7b826c0aa13391d6794b66e1c0f1303 (diff)
downloadchrome-ec-247fdaf13d7d317465d6d04b015a309721e599a9.tar.gz
Change host command params/response pointers to void *
This removes a bunch of unnecessary typecasts, since you can assign to/from void * without them. This also uncovered a few cases where const was being cast away for the input params; now fixed. BUG=none TEST=mkbp hash from u-boot console, and/or system boots ok Change-Id: Ic314b9d2ca06226ea8a09703ef5c1a912eb7146d Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/28500
Diffstat (limited to 'common/gpio_commands.c')
-rw-r--r--common/gpio_commands.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/common/gpio_commands.c b/common/gpio_commands.c
index 67529dc86b..2768540115 100644
--- a/common/gpio_commands.c
+++ b/common/gpio_commands.c
@@ -128,10 +128,8 @@ DECLARE_CONSOLE_COMMAND(gpioset, command_gpio_set,
static int gpio_command_get(struct host_cmd_handler_args *args)
{
- struct ec_params_gpio_get *p =
- (struct ec_params_gpio_get *)args->params;
- struct ec_response_gpio_get *r =
- (struct ec_response_gpio_get *)args->response;
+ const struct ec_params_gpio_get *p = args->params;
+ struct ec_response_gpio_get *r = args->response;
int i;
if (system_is_locked())
@@ -150,10 +148,9 @@ DECLARE_HOST_COMMAND(EC_CMD_GPIO_GET, gpio_command_get, EC_VER_MASK(0));
static int gpio_command_set(struct host_cmd_handler_args *args)
{
- struct ec_params_gpio_set *p =
- (struct ec_params_gpio_set *)args->params;
- int i;
+ const struct ec_params_gpio_set *p = args->params;
const struct gpio_info *g;
+ int i;
if (system_is_locked())
return EC_RES_ACCESS_DENIED;