svn commit: r222460 - head/sys/powerpc/powermac
Nathan Whitehorn
nwhitehorn at FreeBSD.org
Sun May 29 19:53:11 UTC 2011
Author: nwhitehorn
Date: Sun May 29 19:53:11 2011
New Revision: 222460
URL: http://svn.freebsd.org/changeset/base/222460
Log:
Don't put negative values into the averages.
Modified:
head/sys/powerpc/powermac/powermac_thermal.c
Modified: head/sys/powerpc/powermac/powermac_thermal.c
==============================================================================
--- head/sys/powerpc/powermac/powermac_thermal.c Sun May 29 18:41:06 2011 (r222459)
+++ head/sys/powerpc/powermac/powermac_thermal.c Sun May 29 19:53:11 2011 (r222460)
@@ -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);
More information about the svn-src-all
mailing list