diff options
| -rw-r--r-- | drivers/thermal/thermal_sys.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/thermal/thermal_sys.c b/drivers/thermal/thermal_sys.c index 310e40ab00b6..663c2fdba775 100644 --- a/drivers/thermal/thermal_sys.c +++ b/drivers/thermal/thermal_sys.c | |||
| @@ -241,6 +241,8 @@ passive_store(struct device *dev, struct device_attribute *attr, | |||
| 241 | cdev); | 241 | cdev); |
| 242 | } | 242 | } |
| 243 | mutex_unlock(&thermal_list_lock); | 243 | mutex_unlock(&thermal_list_lock); |
| 244 | if (!tz->passive_delay) | ||
| 245 | tz->passive_delay = 1000; | ||
| 244 | } else if (!state && tz->forced_passive) { | 246 | } else if (!state && tz->forced_passive) { |
| 245 | mutex_lock(&thermal_list_lock); | 247 | mutex_lock(&thermal_list_lock); |
| 246 | list_for_each_entry(cdev, &thermal_cdev_list, node) { | 248 | list_for_each_entry(cdev, &thermal_cdev_list, node) { |
| @@ -251,17 +253,12 @@ passive_store(struct device *dev, struct device_attribute *attr, | |||
| 251 | cdev); | 253 | cdev); |
| 252 | } | 254 | } |
| 253 | mutex_unlock(&thermal_list_lock); | 255 | mutex_unlock(&thermal_list_lock); |
| 256 | tz->passive_delay = 0; | ||
| 254 | } | 257 | } |
| 255 | 258 | ||
| 256 | tz->tc1 = 1; | 259 | tz->tc1 = 1; |
| 257 | tz->tc2 = 1; | 260 | tz->tc2 = 1; |
| 258 | 261 | ||
| 259 | if (!tz->passive_delay) | ||
| 260 | tz->passive_delay = 1000; | ||
| 261 | |||
| 262 | if (!tz->polling_delay) | ||
| 263 | tz->polling_delay = 10000; | ||
| 264 | |||
| 265 | tz->forced_passive = state; | 262 | tz->forced_passive = state; |
| 266 | 263 | ||
| 267 | thermal_zone_device_update(tz); | 264 | thermal_zone_device_update(tz); |
