Thermal: pid_thermal_gov: Fix wrong comparison when temp is negative
authorJinyoung Park <jinyoungp@nvidia.com>
Wed, 27 Feb 2013 06:05:03 +0000 (15:05 +0900)
committerMandar Padmawar <mpadmawar@nvidia.com>
Mon, 11 Mar 2013 14:52:22 +0000 (07:52 -0700)
commitacec159f9118120280806b9658d8fefb690ee3dc
tree142c188bcbacee2ed9a2f467d124655c33569632
parent12f5955b6c07c0e5d2e48add1f0b6a97a4a5ccd8
Thermal: pid_thermal_gov: Fix wrong comparison when temp is negative

Corrected variable type of trip_temp from unsigned long to signed long,
to prevent a wrong comparison issue when the temperature is below zero.
And changed order of temp and trip_temp comparison to reduce unnecessary
target calculation.

Bug 1233407

Change-Id: I95cdd67c08239c45115c66d9cfc93c68b59fd529
Signed-off-by: Jinyoung Park <jinyoungp@nvidia.com>
Reviewed-on: http://git-master/r/204935
(cherry picked from commit 8e1d798187c653c0802e9462fc3ed8d6d59b4c77)
Reviewed-on: http://git-master/r/206811
Tested-by: Diwakar Tundlam <dtundlam@nvidia.com>
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Diwakar Tundlam <dtundlam@nvidia.com>
drivers/thermal/pid_thermal_gov.c