From: Axel Lin <axel.lin@ingics.com>
To: Mark Brown <broonie@kernel.org>
Cc: Robin Gong <b38343@freescale.com>,
Liam Girdwood <lgirdwood@gmail.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH] regulator: pfuze100: Fix off-by-one for max_register setting
Date: Thu, 01 Aug 2013 19:59:56 +0800 [thread overview]
Message-ID: <1375358396.15804.1.camel@phoenix> (raw)
max_register should be register count - 1.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
Hi Robin,
I don't have the datasheet, can you check if this patch is correct or not?
If PFUZE_NUMREGS really means register count, I think this fix is required.
Thanks,
Axel
drivers/regulator/pfuze100-regulator.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/regulator/pfuze100-regulator.c b/drivers/regulator/pfuze100-regulator.c
index bda5561..ba67b2c 100644
--- a/drivers/regulator/pfuze100-regulator.c
+++ b/drivers/regulator/pfuze100-regulator.c
@@ -332,7 +332,7 @@ static int pfuze_identify(struct pfuze_chip *pfuze_chip)
static const struct regmap_config pfuze_regmap_config = {
.reg_bits = 8,
.val_bits = 8,
- .max_register = PFUZE_NUMREGS,
+ .max_register = PFUZE_NUMREGS - 1,
.cache_type = REGCACHE_RBTREE,
};
--
1.8.1.2
next reply other threads:[~2013-08-01 12:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-01 11:59 Axel Lin [this message]
2013-08-02 2:06 ` [PATCH] regulator: pfuze100: Fix off-by-one for max_register setting Robin Gong
2013-08-02 10:29 ` Mark Brown
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=1375358396.15804.1.camel@phoenix \
--to=axel.lin@ingics.com \
--cc=b38343@freescale.com \
--cc=broonie@kernel.org \
--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.