[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1380641628.19681.3.camel@phoenix>
Date: Tue, 01 Oct 2013 23:33:48 +0800
From: Axel Lin <axel.lin@...ics.com>
To: Mark Brown <broonie@...nel.org>
Cc: Laxman Dewangan <ldewangan@...dia.com>,
Florian Lobmaier <florian.lobmaier@....com>,
Liam Girdwood <lgirdwood@...il.com>,
linux-kernel@...r.kernel.org
Subject: [RFT][PATCH 1/2] regulator: as3722: Fix equation to calculate
max_uV in regulator_lin_range macro
Fix off-by-one in the equation to calculate max_uV.
Signed-off-by: Axel Lin <axel.lin@...ics.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
--
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