[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1434501578.17681.1.camel@ingics.com>
Date: Wed, 17 Jun 2015 08:39:38 +0800
From: Axel Lin <axel.lin@...ics.com>
To: Mark Brown <broonie@...nel.org>
Cc: Stephen Boyd <sboyd@...eaurora.org>,
Liam Girdwood <lgirdwood@...il.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: [PATCH] regulator: qcom_spmi: Fix missing parenthesis
Fix the logic in spmi_regulator_common_list_voltage() to return correct uV.
Signed-off-by: Axel Lin <axel.lin@...ics.com>
---
drivers/regulator/qcom_spmi-regulator.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/regulator/qcom_spmi-regulator.c b/drivers/regulator/qcom_spmi-regulator.c
index 162b865..1cc435e 100644
--- a/drivers/regulator/qcom_spmi-regulator.c
+++ b/drivers/regulator/qcom_spmi-regulator.c
@@ -747,10 +747,11 @@ static int spmi_regulator_common_list_voltage(struct regulator_dev *rdev,
return 0;
for (i = 0; i < vreg->set_points->count; i++) {
- if (selector < vreg->set_points->range[i].n_voltages)
+ if (selector < vreg->set_points->range[i].n_voltages) {
uV = selector * vreg->set_points->range[i].step_uV
+ vreg->set_points->range[i].set_point_min_uV;
break;
+ }
selector -= vreg->set_points->range[i].n_voltages;
}
--
2.1.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists