public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [RFT][PATCH 1/2] regulator: as3722: Fix equation to calculate max_uV in regulator_lin_range macro
@ 2013-10-01 15:33 Axel Lin
  2013-10-01 15:35 ` [RFT][PATCH 2/2] regulator: as3722: Fix off-by-one n_voltages setting for SDx Axel Lin
  2013-10-02 11:56 ` [RFT][PATCH 1/2] regulator: as3722: Fix equation to calculate max_uV in regulator_lin_range macro Laxman Dewangan
  0 siblings, 2 replies; 6+ messages in thread
From: Axel Lin @ 2013-10-01 15:33 UTC (permalink / raw)
  To: Mark Brown; +Cc: Laxman Dewangan, Florian Lobmaier, Liam Girdwood, linux-kernel

Fix off-by-one in the equation to calculate max_uV.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
Hi,
I don't have the datasheet and h/w.
Just found this issue while reading the code. (Only compile test).

Axel
 drivers/regulator/as3722-regulator.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/regulator/as3722-regulator.c b/drivers/regulator/as3722-regulator.c
index 16a5d26..c6a1fc6 100644
--- a/drivers/regulator/as3722-regulator.c
+++ b/drivers/regulator/as3722-regulator.c
@@ -441,7 +441,7 @@ static struct regulator_ops as3722_ldo3_extcntrl_ops = {
 		.max_sel = _max_sel,					\
 		.uV_step = _step_uV,					\
 		.min_uV = _min_uV,					\
-		.max_uV = _min_uV + (_max_sel - _min_sel + 1) * _step_uV, \
+		.max_uV = _min_uV + (_max_sel - _min_sel) * _step_uV,	\
 	}
 
 static const struct regulator_linear_range as3722_ldo_ranges[] = {
-- 
1.8.1.2




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

end of thread, other threads:[~2013-10-02 12:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-01 15:33 [RFT][PATCH 1/2] regulator: as3722: Fix equation to calculate max_uV in regulator_lin_range macro Axel Lin
2013-10-01 15:35 ` [RFT][PATCH 2/2] regulator: as3722: Fix off-by-one n_voltages setting for SDx Axel Lin
2013-10-02 12:15   ` Laxman Dewangan
2013-10-02 11:56 ` [RFT][PATCH 1/2] regulator: as3722: Fix equation to calculate max_uV in regulator_lin_range macro Laxman Dewangan
2013-10-02 11:56   ` Axel Lin
2013-10-02 12:32     ` Laxman Dewangan

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