Loading drivers/thermal/thermal_trip.c +14 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,20 @@ int for_each_thermal_trip(struct thermal_zone_device *tz, } EXPORT_SYMBOL_GPL(for_each_thermal_trip); int thermal_zone_for_each_trip(struct thermal_zone_device *tz, int (*cb)(struct thermal_trip *, void *), void *data) { int ret; mutex_lock(&tz->lock); ret = for_each_thermal_trip(tz, cb, data); mutex_unlock(&tz->lock); return ret; } EXPORT_SYMBOL_GPL(thermal_zone_for_each_trip); int thermal_zone_get_num_trips(struct thermal_zone_device *tz) { return tz->num_trips; Loading include/linux/thermal.h +3 −0 Original line number Diff line number Diff line Loading @@ -286,6 +286,9 @@ int thermal_zone_set_trip(struct thermal_zone_device *tz, int trip_id, int for_each_thermal_trip(struct thermal_zone_device *tz, int (*cb)(struct thermal_trip *, void *), void *data); int thermal_zone_for_each_trip(struct thermal_zone_device *tz, int (*cb)(struct thermal_trip *, void *), void *data); int thermal_zone_get_num_trips(struct thermal_zone_device *tz); int thermal_zone_get_crit_temp(struct thermal_zone_device *tz, int *temp); Loading Loading
drivers/thermal/thermal_trip.c +14 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,20 @@ int for_each_thermal_trip(struct thermal_zone_device *tz, } EXPORT_SYMBOL_GPL(for_each_thermal_trip); int thermal_zone_for_each_trip(struct thermal_zone_device *tz, int (*cb)(struct thermal_trip *, void *), void *data) { int ret; mutex_lock(&tz->lock); ret = for_each_thermal_trip(tz, cb, data); mutex_unlock(&tz->lock); return ret; } EXPORT_SYMBOL_GPL(thermal_zone_for_each_trip); int thermal_zone_get_num_trips(struct thermal_zone_device *tz) { return tz->num_trips; Loading
include/linux/thermal.h +3 −0 Original line number Diff line number Diff line Loading @@ -286,6 +286,9 @@ int thermal_zone_set_trip(struct thermal_zone_device *tz, int trip_id, int for_each_thermal_trip(struct thermal_zone_device *tz, int (*cb)(struct thermal_trip *, void *), void *data); int thermal_zone_for_each_trip(struct thermal_zone_device *tz, int (*cb)(struct thermal_trip *, void *), void *data); int thermal_zone_get_num_trips(struct thermal_zone_device *tz); int thermal_zone_get_crit_temp(struct thermal_zone_device *tz, int *temp); Loading