diff options
Diffstat (limited to 'drivers/base/regmap/regcache.c')
-rw-r--r-- | drivers/base/regmap/regcache.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/base/regmap/regcache.c b/drivers/base/regmap/regcache.c index d687df6ebdb0..6d93e49c462f 100644 --- a/drivers/base/regmap/regcache.c +++ b/drivers/base/regmap/regcache.c | |||
@@ -111,8 +111,8 @@ int regcache_init(struct regmap *map, const struct regmap_config *config) | |||
111 | map->num_reg_defaults = config->num_reg_defaults; | 111 | map->num_reg_defaults = config->num_reg_defaults; |
112 | map->num_reg_defaults_raw = config->num_reg_defaults_raw; | 112 | map->num_reg_defaults_raw = config->num_reg_defaults_raw; |
113 | map->reg_defaults_raw = config->reg_defaults_raw; | 113 | map->reg_defaults_raw = config->reg_defaults_raw; |
114 | map->cache_size_raw = (config->val_bits / 8) * config->num_reg_defaults_raw; | 114 | map->cache_word_size = DIV_ROUND_UP(config->val_bits, 8); |
115 | map->cache_word_size = config->val_bits / 8; | 115 | map->cache_size_raw = map->cache_word_size * config->num_reg_defaults_raw; |
116 | 116 | ||
117 | map->cache = NULL; | 117 | map->cache = NULL; |
118 | map->cache_ops = cache_types[i]; | 118 | map->cache_ops = cache_types[i]; |