diff options
author | Axel Lin <axel.lin@ingics.com> | 2013-08-01 19:59:56 +0800 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-08-02 11:29:00 +0100 |
commit | 6b8430c3f3090b8b805eb1fbe58390229d2dd067 (patch) | |
tree | 90878bb03358c009e9f60d99694aeca6d144554f /drivers/regulator/pfuze100-regulator.c | |
parent | e56566699ca64ec44dd134ec5310a3585ffacfec (diff) | |
download | op-kernel-dev-6b8430c3f3090b8b805eb1fbe58390229d2dd067.zip op-kernel-dev-6b8430c3f3090b8b805eb1fbe58390229d2dd067.tar.gz |
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.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/regulator/pfuze100-regulator.c b/drivers/regulator/pfuze100-regulator.c index bda5561..ba67b2c 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, }; |