[PATCH] regulator: qcom_spmi: Fix missing parenthesis
From: Axel Lin
Date: Tue Jun 16 2015 - 20:39:59 EST
Fix the logic in spmi_regulator_common_list_voltage() to return correct uV.
Signed-off-by: Axel Lin <axel.lin@xxxxxxxxxx>
---
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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/