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.
Showing the changes to include/linux/platform_data (1 of 3 files). Show all
Unified · Split
| @@ -205,7 +205,7 @@ struct cros_ec_dev { · 204 unmodified lines | ||
| 205 | 205 | struct cros_ec_debugfs *debug_info; |
| 206 | 206 | bool has_kb_wake_angle; |
| 207 | 207 | u16 cmd_offset; |
| 208 | − u32 features[2]; | |
| 208 | + struct ec_response_get_features features; | |
| 209 | 209 | }; |
| 210 | 210 | |
| 211 | 211 | #define to_cros_ec_dev(dev) container_of(dev, struct cros_ec_dev, class_dev) |