Loading drivers/thermal/thermal_core.c +0 −42 Original line number Diff line number Diff line Loading @@ -39,7 +39,6 @@ #include <linux/kthread.h> #include <net/netlink.h> #include <net/genetlink.h> #include <linux/suspend.h> #define CREATE_TRACE_POINTS #include <trace/events/thermal.h> Loading @@ -64,8 +63,6 @@ static LIST_HEAD(thermal_governor_list); static DEFINE_MUTEX(thermal_list_lock); static DEFINE_MUTEX(thermal_governor_lock); static atomic_t in_suspend; static struct thermal_governor *def_governor; static struct thermal_governor *__find_governor(const char *name) Loading Loading @@ -972,9 +969,6 @@ void thermal_zone_device_update(struct thermal_zone_device *tz) { int count; if (atomic_read(&in_suspend)) return; if (!tz->ops->get_temp) return; Loading Loading @@ -2602,36 +2596,6 @@ static void thermal_unregister_governors(void) thermal_gov_power_allocator_unregister(); } static int thermal_pm_notify(struct notifier_block *nb, unsigned long mode, void *_unused) { struct thermal_zone_device *tz; switch (mode) { case PM_HIBERNATION_PREPARE: case PM_RESTORE_PREPARE: case PM_SUSPEND_PREPARE: atomic_set(&in_suspend, 1); break; case PM_POST_HIBERNATION: case PM_POST_RESTORE: case PM_POST_SUSPEND: atomic_set(&in_suspend, 0); list_for_each_entry(tz, &thermal_tz_list, node) { thermal_zone_device_reset(tz); thermal_zone_device_update(tz); } break; default: break; } return 0; } static struct notifier_block thermal_pm_nb = { .notifier_call = thermal_pm_notify, }; static int __init thermal_init(void) { int result; Loading @@ -2652,11 +2616,6 @@ static int __init thermal_init(void) if (result) goto exit_netlink; result = register_pm_notifier(&thermal_pm_nb); if (result) pr_warn("Thermal: Can not register suspend notifier, return %d\n", result); return 0; exit_netlink: Loading @@ -2676,7 +2635,6 @@ error: static void __exit thermal_exit(void) { unregister_pm_notifier(&thermal_pm_nb); of_thermal_destroy_zones(); genetlink_exit(); class_unregister(&thermal_class); Loading Loading
drivers/thermal/thermal_core.c +0 −42 Original line number Diff line number Diff line Loading @@ -39,7 +39,6 @@ #include <linux/kthread.h> #include <net/netlink.h> #include <net/genetlink.h> #include <linux/suspend.h> #define CREATE_TRACE_POINTS #include <trace/events/thermal.h> Loading @@ -64,8 +63,6 @@ static LIST_HEAD(thermal_governor_list); static DEFINE_MUTEX(thermal_list_lock); static DEFINE_MUTEX(thermal_governor_lock); static atomic_t in_suspend; static struct thermal_governor *def_governor; static struct thermal_governor *__find_governor(const char *name) Loading Loading @@ -972,9 +969,6 @@ void thermal_zone_device_update(struct thermal_zone_device *tz) { int count; if (atomic_read(&in_suspend)) return; if (!tz->ops->get_temp) return; Loading Loading @@ -2602,36 +2596,6 @@ static void thermal_unregister_governors(void) thermal_gov_power_allocator_unregister(); } static int thermal_pm_notify(struct notifier_block *nb, unsigned long mode, void *_unused) { struct thermal_zone_device *tz; switch (mode) { case PM_HIBERNATION_PREPARE: case PM_RESTORE_PREPARE: case PM_SUSPEND_PREPARE: atomic_set(&in_suspend, 1); break; case PM_POST_HIBERNATION: case PM_POST_RESTORE: case PM_POST_SUSPEND: atomic_set(&in_suspend, 0); list_for_each_entry(tz, &thermal_tz_list, node) { thermal_zone_device_reset(tz); thermal_zone_device_update(tz); } break; default: break; } return 0; } static struct notifier_block thermal_pm_nb = { .notifier_call = thermal_pm_notify, }; static int __init thermal_init(void) { int result; Loading @@ -2652,11 +2616,6 @@ static int __init thermal_init(void) if (result) goto exit_netlink; result = register_pm_notifier(&thermal_pm_nb); if (result) pr_warn("Thermal: Can not register suspend notifier, return %d\n", result); return 0; exit_netlink: Loading @@ -2676,7 +2635,6 @@ error: static void __exit thermal_exit(void) { unregister_pm_notifier(&thermal_pm_nb); of_thermal_destroy_zones(); genetlink_exit(); class_unregister(&thermal_class); Loading