summaryrefslogtreecommitdiffstats
path: root/drivers/mfd
diff options
context:
space:
mode:
authorMaciej S. Szmigiero <mail@maciej.szmigiero.name>2016-01-31 22:56:59 +0100
committerLee Jones <lee.jones@linaro.org>2016-03-16 08:50:34 +0000
commite9b7ba7954fa8df6e021ee4bef084ed10eba2c2b (patch)
tree0cc8eac43c8c27c0dee11a95ae74828e5d5f4be6 /drivers/mfd
parenta862dc3ea793256a1364991f52e68198a2c5f27d (diff)
downloadlinux-e9b7ba7954fa8df6e021ee4bef084ed10eba2c2b.tar.bz2
mfd: as3711: Set regmap config reg counts properly
Regmap config max_register field should contain number of device last register, however num_reg_defaults_raw field should be set to register count instead (usually one register more than max_register). as3711 driver had both of these fields set to the same value, fix this by introducing separate defines for max register number and total count of registers. Signed-off-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers/mfd')
-rw-r--r--drivers/mfd/as3711.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mfd/as3711.c b/drivers/mfd/as3711.c
index 94d67a6e1eb7..09e1483b99bc 100644
--- a/drivers/mfd/as3711.c
+++ b/drivers/mfd/as3711.c
@@ -108,8 +108,8 @@ static const struct regmap_config as3711_regmap_config = {
.volatile_reg = as3711_volatile_reg,
.readable_reg = as3711_readable_reg,
.precious_reg = as3711_precious_reg,
- .max_register = AS3711_MAX_REGS,
- .num_reg_defaults_raw = AS3711_MAX_REGS,
+ .max_register = AS3711_MAX_REG,
+ .num_reg_defaults_raw = AS3711_NUM_REGS,
.cache_type = REGCACHE_RBTREE,
};