Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 177536
b: refs/heads/master
c: 3d8e3ad
h: refs/heads/master
v: v3
  • Loading branch information
Frans Pop authored and Len Brown committed Nov 5, 2009
1 parent 1901d69 commit 2e14d78
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7fb2616e249184e217f9818a7662596165710ea4
refs/heads/master: 3d8e3ad879441ae14c5957b933028daf39d252b0
1 change: 1 addition & 0 deletions trunk/Documentation/thermal/sysfs-api.txt
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ passive
passive trip point for the zone. Activation is done by polling with
an interval of 1 second.
Unit: millidegrees Celsius
Valid values: 0 (disabled) or greater than 1000
RW, Optional

*****************************
Expand Down
6 changes: 6 additions & 0 deletions trunk/drivers/thermal/thermal_sys.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,12 @@ passive_store(struct device *dev, struct device_attribute *attr,
if (!sscanf(buf, "%d\n", &state))
return -EINVAL;

/* sanity check: values below 1000 millicelcius don't make sense
* and can cause the system to go into a thermal heart attack
*/
if (state && state < 1000)
return -EINVAL;

if (state && !tz->forced_passive) {
mutex_lock(&thermal_list_lock);
list_for_each_entry(cdev, &thermal_cdev_list, node) {
Expand Down

0 comments on commit 2e14d78

Please sign in to comment.