aboutsummaryrefslogtreecommitdiff
path: root/drivers/hwmon
diff options
context:
space:
mode:
authorMartin Persson <martin.persson@stericsson.com>2010-09-28 19:42:11 +0200
committerMian Yousaf Kaukab <mian.yousaf.kaukab@stericsson.com>2010-10-23 13:29:56 +0200
commitd7f76bc61de298ae30bfb34696ec80fe6296927a (patch)
tree1684b7c99ecd9f26a5b7d644fd90c4eb7700342f /drivers/hwmon
parentcb8094002ec9c9d1f617cc775087c96738af71e0 (diff)
hwmon: Correct threshold error in ab8500 sensor
Two if statements handled the min threshold incorrectly. ST-Ericsson ID: 273645 Signed-off-by: Martin Persson <martin.persson@stericsson.com> Change-Id: Iadf653a8807492f69dd4293811243fd1828330c0 Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/5739 Reviewed-by: Jonas ABERG <jonas.aberg@stericsson.com> Reviewed-by: Mattias WALLIN <mattias.wallin@stericsson.com> Tested-by: Martin PERSSON <martin.persson@stericsson.com>
Diffstat (limited to 'drivers/hwmon')
-rw-r--r--drivers/hwmon/ab8500.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/hwmon/ab8500.c b/drivers/hwmon/ab8500.c
index aa15bfb56eb..9b093188406 100644
--- a/drivers/hwmon/ab8500.c
+++ b/drivers/hwmon/ab8500.c
@@ -85,7 +85,8 @@ static bool find_active_thresholds(struct ab8500_temp *data)
{
int i;
for (i = 0; i < NUM_MONITORED_SENSORS; i++)
- if (data->max[i] != 0 || data->max_hyst[i] != 0)
+ if (data->max[i] != 0 || data->max_hyst[i] != 0
+ || data->min[i] != 0)
return true;
dev_dbg(&data->pdev->dev, "No active thresholds,"
@@ -122,7 +123,8 @@ static void gpadc_monitor(struct work_struct *work)
for (i = 0; i < NUM_MONITORED_SENSORS; i++) {
/* Thresholds are considered inactive if set to 0 */
- if (data->max[i] == 0 && data->max_hyst[i] == 0)
+ if (data->max[i] == 0 && data->max_hyst[i] == 0
+ && data->min[i] == 0)
continue;
val = ab8500_gpadc_convert(data->ab8500->gpadc,