aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging/ti-soc-thermal
diff options
context:
space:
mode:
authorEduardo Valentin <eduardo.valentin@ti.com>2013-03-19 10:54:26 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-03-25 11:28:31 -0700
commitf5d43b7a51af16977b260c05435d61fc653f584a (patch)
treeb1063bcb909132a1d36fa46011902e44c6350de7 /drivers/staging/ti-soc-thermal
parent61603af326d872014d1106141dbf5211c7963cd3 (diff)
downloadlinux-f5d43b7a51af16977b260c05435d61fc653f584a.tar.gz
staging: ti-soc-thermal: fix condition to apply hyst
While updating talert thresholds, threshold cold must always be lower than threshold hot. This patch fixes the function ti_bandgap_update_alert_threshold to only change the thresholds by applying a hysteresis when they violate this condition. Signed-off-by: Eduardo Valentin <eduardo.valentin@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/ti-soc-thermal')
-rw-r--r--drivers/staging/ti-soc-thermal/ti-bandgap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/ti-soc-thermal/ti-bandgap.c b/drivers/staging/ti-soc-thermal/ti-bandgap.c
index a9d6d2a3580..d0751863a9c 100644
--- a/drivers/staging/ti-soc-thermal/ti-bandgap.c
+++ b/drivers/staging/ti-soc-thermal/ti-bandgap.c
@@ -406,7 +406,7 @@ static int ti_bandgap_update_alert_threshold(struct ti_bandgap *bgp, int id,
else
t_cold = val;
- if (t_cold < t_hot) {
+ if (t_cold > t_hot) {
if (hot)
err = ti_bandgap_add_hyst(bgp, t_hot,
-ts_data->hyst_val,