Skip to content

Commit

Permalink
regulator: pfuze100: Fix off-by-one for max_register setting
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Axel Lin authored and Mark Brown committed Aug 2, 2013
1 parent e565666 commit 6b8430c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/regulator/pfuze100-regulator.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};

Expand Down

0 comments on commit 6b8430c

Please sign in to comment.