summaryrefslogtreecommitdiff
path: root/drivers/regulator/pfuze100-regulator.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2013-08-01 11:59:56 (GMT)
committerMark Brown <broonie@linaro.org>2013-08-02 10:29:00 (GMT)
commit6b8430c3f3090b8b805eb1fbe58390229d2dd067 (patch)
tree90878bb03358c009e9f60d99694aeca6d144554f /drivers/regulator/pfuze100-regulator.c
parente56566699ca64ec44dd134ec5310a3585ffacfec (diff)
downloadlinux-6b8430c3f3090b8b805eb1fbe58390229d2dd067.tar.xz
regulator: pfuze100: Fix off-by-one for max_register setting
max_register should be register count - 1. Signed-off-by: Axel Lin <axel.lin@ingics.com> Reviewed-by: Robin Gong <b38343@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers/regulator/pfuze100-regulator.c')
-rw-r--r--drivers/regulator/pfuze100-regulator.c2
1 files changed, 1 insertions, 1 deletions
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,
};