public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] regulator: qcom_spmi: Fix missing parenthesis
@ 2015-06-17  0:39 Axel Lin
  2015-06-17  0:42 ` Stephen Boyd
  0 siblings, 1 reply; 2+ messages in thread
From: Axel Lin @ 2015-06-17  0:39 UTC (permalink / raw)
  To: Mark Brown; +Cc: Stephen Boyd, Liam Girdwood, linux-kernel@vger.kernel.org

Fix the logic in spmi_regulator_common_list_voltage() to return correct uV.

Signed-off-by: Axel Lin <axel.lin@ingics.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




^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] regulator: qcom_spmi: Fix missing parenthesis
  2015-06-17  0:39 [PATCH] regulator: qcom_spmi: Fix missing parenthesis Axel Lin
@ 2015-06-17  0:42 ` Stephen Boyd
  0 siblings, 0 replies; 2+ messages in thread
From: Stephen Boyd @ 2015-06-17  0:42 UTC (permalink / raw)
  To: Axel Lin, Mark Brown; +Cc: Liam Girdwood, linux-kernel@vger.kernel.org

On 06/16/2015 05:39 PM, Axel Lin wrote:
> Fix the logic in spmi_regulator_common_list_voltage() to return correct uV.
>
> Signed-off-by: Axel Lin <axel.lin@ingics.com>

There are two, and patch already sent[1].

[1] https://patchwork.kernel.org/patch/6619381/

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-06-17  0:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-17  0:39 [PATCH] regulator: qcom_spmi: Fix missing parenthesis Axel Lin
2015-06-17  0:42 ` Stephen Boyd

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox