aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator/pfuze100-regulator.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2013-08-01 19:59:56 +0800
committerMark Brown <broonie@linaro.org>2013-08-02 11:29:00 +0100
commit6b8430c3f3090b8b805eb1fbe58390229d2dd067 (patch)
tree90878bb03358c009e9f60d99694aeca6d144554f /drivers/regulator/pfuze100-regulator.c
parentregulator: pfuze100: Simplify pfuze100_set_ramp_delay implementation (diff)
downloadlinux-dev-6b8430c3f3090b8b805eb1fbe58390229d2dd067.tar.xz
linux-dev-6b8430c3f3090b8b805eb1fbe58390229d2dd067.zip
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 bda55617092b..ba67b2c4e2e7 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,
};