Commit 5d122256 authored by Prashant Malani's avatar Prashant Malani Committed by Enric Balletbo i Serra

platform/chrome: cros_ec_proto: Make data pointers void

Convert the input and output data pointers for cros_ec_command() to
void pointers so that the callers don't have to cast their custom
structs to uint8_t *.
Signed-off-by: default avatarPrashant Malani <pmalani@chromium.org>
Signed-off-by: default avatarEnric Balletbo i Serra <enric.balletbo@collabora.com>
Link: https://lore.kernel.org/r/20210930022403.3358070-4-pmalani@chromium.org
parent 7101c839
...@@ -925,9 +925,9 @@ EXPORT_SYMBOL_GPL(cros_ec_get_sensor_count); ...@@ -925,9 +925,9 @@ EXPORT_SYMBOL_GPL(cros_ec_get_sensor_count);
*/ */
int cros_ec_command(struct cros_ec_device *ec_dev, int cros_ec_command(struct cros_ec_device *ec_dev,
int command, int command,
uint8_t *outdata, void *outdata,
int outsize, int outsize,
uint8_t *indata, void *indata,
int insize) int insize)
{ {
struct cros_ec_command *msg; struct cros_ec_command *msg;
......
...@@ -72,7 +72,7 @@ static void cros_usbpd_get_event_and_notify(struct device *dev, ...@@ -72,7 +72,7 @@ static void cros_usbpd_get_event_and_notify(struct device *dev,
/* Check for PD host events on EC. */ /* Check for PD host events on EC. */
ret = cros_ec_command(ec_dev, EC_CMD_PD_HOST_EVENT_STATUS, ret = cros_ec_command(ec_dev, EC_CMD_PD_HOST_EVENT_STATUS,
NULL, 0, (uint8_t *)&host_event_status, sizeof(host_event_status)); NULL, 0, &host_event_status, sizeof(host_event_status));
if (ret < 0) { if (ret < 0) {
dev_warn(dev, "Can't get host event status (err: %d)\n", ret); dev_warn(dev, "Can't get host event status (err: %d)\n", ret);
goto send_notify; goto send_notify;
......
...@@ -231,8 +231,8 @@ bool cros_ec_check_features(struct cros_ec_dev *ec, int feature); ...@@ -231,8 +231,8 @@ 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_get_sensor_count(struct cros_ec_dev *ec);
int cros_ec_command(struct cros_ec_device *ec_dev, int command, uint8_t *outdata, int outsize, int cros_ec_command(struct cros_ec_device *ec_dev, int command, void *outdata, int outsize,
uint8_t *indata, int insize); void *indata, int insize);
/** /**
* cros_ec_get_time_ns() - Return time in ns. * cros_ec_get_time_ns() - Return time in ns.
......
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