diff options
author | Axel Lin <axel.lin@ingics.com> | 2013-08-01 07:59:56 -0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-08-02 06:29:00 -0400 |
commit | 6b8430c3f3090b8b805eb1fbe58390229d2dd067 (patch) | |
tree | 90878bb03358c009e9f60d99694aeca6d144554f /drivers/regulator | |
parent | e56566699ca64ec44dd134ec5310a3585ffacfec (diff) |
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')
-rw-r--r-- | drivers/regulator/pfuze100-regulator.c | 2 |
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) | |||
332 | static const struct regmap_config pfuze_regmap_config = { | 332 | static const struct regmap_config pfuze_regmap_config = { |
333 | .reg_bits = 8, | 333 | .reg_bits = 8, |
334 | .val_bits = 8, | 334 | .val_bits = 8, |
335 | .max_register = PFUZE_NUMREGS, | 335 | .max_register = PFUZE_NUMREGS - 1, |
336 | .cache_type = REGCACHE_RBTREE, | 336 | .cache_type = REGCACHE_RBTREE, |
337 | }; | 337 | }; |
338 | 338 | ||