Remove the duplicated code in MFD, since MFD just registers cros-ec-sensorhub if at least one sensor is present. Change IIO cros-ec driver to get the pointer to the cros-ec-dev through cros-ec-sensorhub.
Showing the changes to include/linux (2 of 7 files). Show all
Unified · Split
| @@ -168,14 +168,6 @@ struct cros_ec_device { · 167 unmodified lines | |||
| 168 | struct platform_device *pd; | 168 | struct platform_device *pd; |
| 169 | }; | 169 | }; |
| 170 | 170 | ||
| 171 | /** | ||
| 172 | * struct cros_ec_sensor_platform - ChromeOS EC sensor platform information. | ||
| 173 | * @sensor_num: Id of the sensor, as reported by the EC. | ||
| 174 | */ | ||
| 175 | struct cros_ec_sensor_platform { | ||
| 176 | u8 sensor_num; | ||
| 177 | }; | ||
| 178 | |||
| 179 | /** | 171 | /** |
| 180 | * struct cros_ec_platform - ChromeOS EC platform information. | 172 | * struct cros_ec_platform - ChromeOS EC platform information. |
| 181 | * @ec_name: Name of EC device (e.g. 'cros-ec', 'cros-pd', ...) | 173 | * @ec_name: Name of EC device (e.g. 'cros-ec', 'cros-pd', ...) |
| @@ -10,6 +10,14 @@ · 9 unmodified lines | |||
| 10 | 10 | ||
| 11 | #include <linux/platform_data/cros_ec_commands.h> | 11 | #include <linux/platform_data/cros_ec_commands.h> |
| 12 | 12 | ||
| 13 | /** | ||
| 14 | * struct cros_ec_sensor_platform - ChromeOS EC sensor platform information. | ||
| 15 | * @sensor_num: Id of the sensor, as reported by the EC. | ||
| 16 | */ | ||
| 17 | struct cros_ec_sensor_platform { | ||
| 18 | u8 sensor_num; | ||
| 19 | }; | ||
| 20 | |||
| 13 | /** | 21 | /** |
| 14 | * struct cros_ec_sensorhub - Sensor Hub device data. | 22 | * struct cros_ec_sensorhub - Sensor Hub device data. |
| 15 | * | 23 | * |