History

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.

Stephen Boyd committed 3 years ago

Commit 2f3dd391 parent 14e7c012 files · +2 −2Browse files

Showing the changes to include/linux/platform_data (1 of 2 files). Show all

Unified · Split

include/linux/platform_data/cros_ec_proto.h+1−1
@@ -258,7 +258,7 @@ bool cros_ec_check_features(struct cros_ec_dev *ec, int feature); · 257 unmodified lines
258 258
259int cros_ec_get_sensor_count(struct cros_ec_dev *ec);259int cros_ec_get_sensor_count(struct cros_ec_dev *ec);
260 260
261int cros_ec_cmd(struct cros_ec_device *ec_dev, unsigned int version, int command, void *outdata,261int cros_ec_cmd(struct cros_ec_device *ec_dev, unsigned int version, int command, const void *outdata,
262 size_t outsize, void *indata, size_t insize);262 size_t outsize, void *indata, size_t insize);
263 263
264/**264/**

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t