diff options
author | nwhitehorn <nwhitehorn@FreeBSD.org> | 2011-05-29 19:53:11 +0000 |
---|---|---|
committer | nwhitehorn <nwhitehorn@FreeBSD.org> | 2011-05-29 19:53:11 +0000 |
commit | c32e78294610dabd3dd2f86896b1c0f6d30a4491 (patch) | |
tree | c34577b449a00b45b9b6f4a6c2065efaf3f08862 /sys | |
parent | aff5c69fe1a8ec60d886d1b2a7b32baa84ad3422 (diff) | |
download | FreeBSD-src-c32e78294610dabd3dd2f86896b1c0f6d30a4491.zip FreeBSD-src-c32e78294610dabd3dd2f86896b1c0f6d30a4491.tar.gz |
Don't put negative values into the averages.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/powerpc/powermac/powermac_thermal.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/powerpc/powermac/powermac_thermal.c b/sys/powerpc/powermac/powermac_thermal.c index 89637ca..041924a 100644 --- a/sys/powerpc/powermac/powermac_thermal.c +++ b/sys/powerpc/powermac/powermac_thermal.c @@ -121,6 +121,8 @@ pmac_therm_manage_fans(void) sensor->sensor->target_temp)*100 / (sensor->sensor->max_temp - sensor->sensor->target_temp); + if (frac_excess < 0) + frac_excess = 0; if (sensor->sensor->zone == fan->fan->zone) { max_excess_zone = imax(max_excess_zone, frac_excess); |