From: Sascha Hauer Date: Wed, 20 May 2015 13:20:41 +0000 (+0200) Subject: thermal: bang-bang governor: act on lower trip boundary X-Git-Tag: firefly_0821_release~2726 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=dcdaad18587e3b4506f7eec4dc5003134ec90699;p=firefly-linux-kernel-4.4.55.git thermal: bang-bang governor: act on lower trip boundary With interrupt driven thermal zones we pass the lower and upper temperature on which shall be acted, so in the governor we have to act on the exact lower temperature to be consistent. Otherwise an interrupt may be generated on the exact lower temperature, but the bang bang governor does not react. Change-Id: Ic9dd855b0767d34b15505c1ff12ea99b76cdcea7 Signed-off-by: Sascha Hauer Signed-off-by: Caesar Wang --- diff --git a/drivers/thermal/gov_bang_bang.c b/drivers/thermal/gov_bang_bang.c index 70836c5b89bc..9d1dfea6808f 100644 --- a/drivers/thermal/gov_bang_bang.c +++ b/drivers/thermal/gov_bang_bang.c @@ -59,7 +59,7 @@ static void thermal_zone_trip_update(struct thermal_zone_device *tz, int trip) if (instance->target == 0 && tz->temperature >= trip_temp) instance->target = 1; else if (instance->target == 1 && - tz->temperature < trip_temp - trip_hyst) + tz->temperature <= trip_temp - trip_hyst) instance->target = 0; dev_dbg(&instance->cdev->device, "target=%d\n",