History

platform/chrome: cros_ec_proto: Use EC struct for features

The Chrome EC's features are returned through an ec_response_get_features struct, but they are stored in an independent array. Although the two are effectively the same at present (2 unsigned 32 bit ints), there is the possibility that they could go out of sync. Avoid this by only using the EC struct to store the features.

Prashant Malani committed 5 years ago

Commit 7ff22781 parent 3119c283 files · +11 −10Browse files

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

Unified · Split

include/linux/platform_data/cros_ec_proto.h+1−1
@@ -205,7 +205,7 @@ struct cros_ec_dev { · 204 unmodified lines
205205 struct cros_ec_debugfs *debug_info;
206206 bool has_kb_wake_angle;
207207 u16 cmd_offset;
208− u32 features[2];
208+ struct ec_response_get_features features;
209209 };
210210
211211 #define to_cros_ec_dev(dev) container_of(dev, struct cros_ec_dev, class_dev)