* [patch for 2.6.30? 1/1] acpi thermal: fix off-by-1 error in trip point trigger condition
@ 2009-05-12 20:25 akpm
2009-05-14 17:42 ` Len Brown
0 siblings, 1 reply; 2+ messages in thread
From: akpm @ 2009-05-12 20:25 UTC (permalink / raw)
To: lenb; +Cc: linux-acpi, akpm, eightgraph, rui.zhang
From: Vladimir Zajac <eightgraph@gmail.com>
Fix a regression caused by commit b1569e99c795bf83b4ddf41c4f1c42761ab7f75e
("ACPI: move thermal trip handling to generic thermal layer") which
accidentally changed trip point trigger condition to temp > trip_temp
This patch changes the trigger condition back to
temp >= trip_temp
Signed-off-by: Vladimir Zajac <eightgraph@gmail.com>
Cc: Zhang Rui <rui.zhang@intel.com>
Cc: Len Brown <lenb@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
drivers/thermal/thermal_sys.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff -puN drivers/thermal/thermal_sys.c~acpi-thermal-fix-off-by-1-error-in-trip-point-trigger-condition drivers/thermal/thermal_sys.c
--- a/drivers/thermal/thermal_sys.c~acpi-thermal-fix-off-by-1-error-in-trip-point-trigger-condition
+++ a/drivers/thermal/thermal_sys.c
@@ -961,7 +961,7 @@ void thermal_zone_device_update(struct t
switch (trip_type) {
case THERMAL_TRIP_CRITICAL:
- if (temp > trip_temp) {
+ if (temp >= trip_temp) {
if (tz->ops->notify)
ret = tz->ops->notify(tz, count,
trip_type);
@@ -974,7 +974,7 @@ void thermal_zone_device_update(struct t
}
break;
case THERMAL_TRIP_HOT:
- if (temp > trip_temp)
+ if (temp >= trip_temp)
if (tz->ops->notify)
tz->ops->notify(tz, count, trip_type);
break;
@@ -986,14 +986,14 @@ void thermal_zone_device_update(struct t
cdev = instance->cdev;
- if (temp > trip_temp)
+ if (temp >= trip_temp)
cdev->ops->set_cur_state(cdev, 1);
else
cdev->ops->set_cur_state(cdev, 0);
}
break;
case THERMAL_TRIP_PASSIVE:
- if (temp > trip_temp || tz->passive)
+ if (temp >= trip_temp || tz->passive)
thermal_zone_device_passive(tz, temp,
trip_temp, count);
break;
_
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-05-14 17:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-12 20:25 [patch for 2.6.30? 1/1] acpi thermal: fix off-by-1 error in trip point trigger condition akpm
2009-05-14 17:42 ` Len Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox