diff options
author | Axel Lin <axel.lin@ingics.com> | 2013-08-01 07:59:56 -0400 |
---|---|---|
committer | Nitin Garg <nitin.garg@freescale.com> | 2014-04-16 09:00:57 -0400 |
commit | b782e93fd4e686f0d78089fa28d3417ff2912598 (patch) | |
tree | c5e7158bfeb9a64461eff684f47528edfe18ff01 | |
parent | e3617795649d4fa7ecb4daedf1f8fd62c89bac91 (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>
-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 | ||