1 From: Axel Lin <axel.lin@ingics.com>
2 Subject: [PATCH] regulator: pfuze100: Fix off-by-one for max_register setting
4 max_register should be register count - 1.
6 Signed-off-by: Axel Lin <axel.lin@ingics.com>
7 Reviewed-by: Robin Gong <b38343@freescale.com>
8 Signed-off-by: Mark Brown <broonie@linaro.org>
10 drivers/regulator/pfuze100-regulator.c | 2 +-
11 1 file changed, 1 insertion(+), 1 deletion(-)
13 --- a/drivers/regulator/pfuze100-regulator.c
14 +++ b/drivers/regulator/pfuze100-regulator.c
15 @@ -332,7 +332,7 @@ static int pfuze_identify(struct pfuze_c
16 static const struct regmap_config pfuze_regmap_config = {
19 - .max_register = PFUZE_NUMREGS,
20 + .max_register = PFUZE_NUMREGS - 1,
21 .cache_type = REGCACHE_RBTREE,