Commit 2f3dd39e authored by Stephen Boyd's avatar Stephen Boyd Committed by Tzung-Bi Shih

platform/chrome: cros_ec_proto: Mark outdata as const

The 'outdata' is copied to the data buffer in cros_ec_cmd() before being
sent over to the EC. Mark the argument as const so that callers can pass
const pointers to this function and so that callers know the data won't
be modified.

Cc: Prashant Malani <pmalani@chromium.org>
Signed-off-by: default avatarStephen Boyd <swboyd@chromium.org>
Acked-by: default avatarPrashant Malani <pmalani@chromium.org>
Link: https://lore.kernel.org/r/20231003003429.1378109-5-swboyd@chromium.orgSigned-off-by: default avatarTzung-Bi Shih <tzungbi@kernel.org>
parent 14e7c01c
......@@ -1004,7 +1004,7 @@ EXPORT_SYMBOL_GPL(cros_ec_get_sensor_count);
int cros_ec_cmd(struct cros_ec_device *ec_dev,
unsigned int version,
int command,
void *outdata,
const void *outdata,
size_t outsize,
void *indata,
size_t insize)
......
......@@ -258,7 +258,7 @@ bool cros_ec_check_features(struct cros_ec_dev *ec, int feature);
int cros_ec_get_sensor_count(struct cros_ec_dev *ec);
int cros_ec_cmd(struct cros_ec_device *ec_dev, unsigned int version, int command, void *outdata,
int cros_ec_cmd(struct cros_ec_device *ec_dev, unsigned int version, int command, const void *outdata,
size_t outsize, void *indata, size_t insize);
/**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment