From: Axel Lin <axel.lin@ingics.com>
To: Mark Brown <broonie@kernel.org>
Cc: Laxman Dewangan <ldewangan@nvidia.com>,
Florian Lobmaier <florian.lobmaier@ams.com>,
Liam Girdwood <lgirdwood@gmail.com>,
linux-kernel@vger.kernel.org
Subject: [RFT][PATCH 1/2] regulator: as3722: Fix equation to calculate max_uV in regulator_lin_range macro
Date: Tue, 01 Oct 2013 23:33:48 +0800 [thread overview]
Message-ID: <1380641628.19681.3.camel@phoenix> (raw)
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
next reply other threads:[~2013-10-01 15:34 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-01 15:33 Axel Lin [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1380641628.19681.3.camel@phoenix \
--to=axel.lin@ingics.com \
--cc=broonie@kernel.org \
--cc=florian.lobmaier@ams.com \
--cc=ldewangan@nvidia.com \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.