History

thermal: Move internal IPA functions

The exported IPA functions are used by the IPA. It is pointless to declare the functions in the thermal.h file. For better self-encapsulation and less impact for the compilation if a change is made on it. Move the code in the thermal core internal header file. As the users depends on THERMAL then it is pointless to have the stub, remove them. Take also the opportunity to fix checkpatch warnings/errors when moving the code around.

Daniel Lezcano committed 6 years ago

Commit 33a88af1 parent c68df442 files · +13 −24Browse files

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

Unified · Split

include/linux/thermal.h+0−24
@@ -399,18 +399,6 @@ void devm_thermal_zone_of_sensor_unregister(struct device *dev, · 398 unmodified lines
399399 #endif
400400
401401 #if IS_ENABLED(CONFIG_THERMAL)
402−static inline bool cdev_is_power_actor(struct thermal_cooling_device *cdev)
403−{
404− return cdev->ops->get_requested_power && cdev->ops->state2power &&
405− cdev->ops->power2state;
406−}
407−
408−int power_actor_get_max_power(struct thermal_cooling_device *,
409− struct thermal_zone_device *tz, u32 *max_power);
410−int power_actor_get_min_power(struct thermal_cooling_device *,
411− struct thermal_zone_device *tz, u32 *min_power);
412−int power_actor_set_power(struct thermal_cooling_device *,
413− struct thermal_instance *, u32);
414402 struct thermal_zone_device *thermal_zone_device_register(const char *, int, int,
415403 void *, struct thermal_zone_device_ops *,
416404 struct thermal_zone_params *, int, int);
@@ -447,18 +435,6 @@ struct thermal_instance *get_thermal_instance(struct thermal_zone_device *, · 30 unmodified lines
447435 void thermal_cdev_update(struct thermal_cooling_device *);
448436 void thermal_notify_framework(struct thermal_zone_device *, int);
449437 #else
450−static inline bool cdev_is_power_actor(struct thermal_cooling_device *cdev)
451−{ return false; }
452−static inline int power_actor_get_max_power(struct thermal_cooling_device *cdev,
453− struct thermal_zone_device *tz, u32 *max_power)
454−{ return 0; }
455−static inline int power_actor_get_min_power(struct thermal_cooling_device *cdev,
456− struct thermal_zone_device *tz,
457− u32 *min_power)
458−{ return -ENODEV; }
459−static inline int power_actor_set_power(struct thermal_cooling_device *cdev,
460− struct thermal_instance *tz, u32 power)
461−{ return 0; }
462438 static inline struct thermal_zone_device *thermal_zone_device_register(
463439 const char *type, int trips, int mask, void *devdata,
464440 struct thermal_zone_device_ops *ops,