Loading drivers/thermal/thermal_core.c +19 −0 Original line number Diff line number Diff line Loading @@ -497,6 +497,25 @@ void thermal_zone_device_update(struct thermal_zone_device *tz, } EXPORT_SYMBOL_GPL(thermal_zone_device_update); /** * thermal_zone_device_exec - Run a callback under the zone lock. * @tz: Thermal zone. * @cb: Callback to run. * @data: Data to pass to the callback. */ void thermal_zone_device_exec(struct thermal_zone_device *tz, void (*cb)(struct thermal_zone_device *, unsigned long), unsigned long data) { mutex_lock(&tz->lock); cb(tz, data); mutex_unlock(&tz->lock); } EXPORT_SYMBOL_GPL(thermal_zone_device_exec); static void thermal_zone_device_check(struct work_struct *work) { struct thermal_zone_device *tz = container_of(work, struct Loading include/linux/thermal.h +4 −0 Original line number Diff line number Diff line Loading @@ -323,6 +323,10 @@ int thermal_zone_unbind_cooling_device(struct thermal_zone_device *, int, struct thermal_cooling_device *); void thermal_zone_device_update(struct thermal_zone_device *, enum thermal_notify_event); void thermal_zone_device_exec(struct thermal_zone_device *tz, void (*cb)(struct thermal_zone_device *, unsigned long), unsigned long data); struct thermal_cooling_device *thermal_cooling_device_register(const char *, void *, const struct thermal_cooling_device_ops *); Loading Loading
drivers/thermal/thermal_core.c +19 −0 Original line number Diff line number Diff line Loading @@ -497,6 +497,25 @@ void thermal_zone_device_update(struct thermal_zone_device *tz, } EXPORT_SYMBOL_GPL(thermal_zone_device_update); /** * thermal_zone_device_exec - Run a callback under the zone lock. * @tz: Thermal zone. * @cb: Callback to run. * @data: Data to pass to the callback. */ void thermal_zone_device_exec(struct thermal_zone_device *tz, void (*cb)(struct thermal_zone_device *, unsigned long), unsigned long data) { mutex_lock(&tz->lock); cb(tz, data); mutex_unlock(&tz->lock); } EXPORT_SYMBOL_GPL(thermal_zone_device_exec); static void thermal_zone_device_check(struct work_struct *work) { struct thermal_zone_device *tz = container_of(work, struct Loading
include/linux/thermal.h +4 −0 Original line number Diff line number Diff line Loading @@ -323,6 +323,10 @@ int thermal_zone_unbind_cooling_device(struct thermal_zone_device *, int, struct thermal_cooling_device *); void thermal_zone_device_update(struct thermal_zone_device *, enum thermal_notify_event); void thermal_zone_device_exec(struct thermal_zone_device *tz, void (*cb)(struct thermal_zone_device *, unsigned long), unsigned long data); struct thermal_cooling_device *thermal_cooling_device_register(const char *, void *, const struct thermal_cooling_device_ops *); Loading