diff options
| -rw-r--r-- | drivers/thermal/thermal_core.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c index 39fc8124741c..6590bb5cb688 100644 --- a/drivers/thermal/thermal_core.c +++ b/drivers/thermal/thermal_core.c | |||
| @@ -451,16 +451,20 @@ static void update_temperature(struct thermal_zone_device *tz) | |||
| 451 | tz->last_temperature, tz->temperature); | 451 | tz->last_temperature, tz->temperature); |
| 452 | } | 452 | } |
| 453 | 453 | ||
| 454 | static void thermal_zone_device_reset(struct thermal_zone_device *tz) | 454 | static void thermal_zone_device_init(struct thermal_zone_device *tz) |
| 455 | { | 455 | { |
| 456 | struct thermal_instance *pos; | 456 | struct thermal_instance *pos; |
| 457 | |||
| 458 | tz->temperature = THERMAL_TEMP_INVALID; | 457 | tz->temperature = THERMAL_TEMP_INVALID; |
| 459 | tz->passive = 0; | ||
| 460 | list_for_each_entry(pos, &tz->thermal_instances, tz_node) | 458 | list_for_each_entry(pos, &tz->thermal_instances, tz_node) |
| 461 | pos->initialized = false; | 459 | pos->initialized = false; |
| 462 | } | 460 | } |
| 463 | 461 | ||
| 462 | static void thermal_zone_device_reset(struct thermal_zone_device *tz) | ||
| 463 | { | ||
| 464 | tz->passive = 0; | ||
| 465 | thermal_zone_device_init(tz); | ||
| 466 | } | ||
| 467 | |||
| 464 | void thermal_zone_device_update(struct thermal_zone_device *tz, | 468 | void thermal_zone_device_update(struct thermal_zone_device *tz, |
| 465 | enum thermal_notify_event event) | 469 | enum thermal_notify_event event) |
| 466 | { | 470 | { |
| @@ -1502,7 +1506,7 @@ static int thermal_pm_notify(struct notifier_block *nb, | |||
| 1502 | case PM_POST_SUSPEND: | 1506 | case PM_POST_SUSPEND: |
| 1503 | atomic_set(&in_suspend, 0); | 1507 | atomic_set(&in_suspend, 0); |
| 1504 | list_for_each_entry(tz, &thermal_tz_list, node) { | 1508 | list_for_each_entry(tz, &thermal_tz_list, node) { |
| 1505 | thermal_zone_device_reset(tz); | 1509 | thermal_zone_device_init(tz); |
| 1506 | thermal_zone_device_update(tz, | 1510 | thermal_zone_device_update(tz, |
| 1507 | THERMAL_EVENT_UNSPECIFIED); | 1511 | THERMAL_EVENT_UNSPECIFIED); |
| 1508 | } | 1512 | } |
