Commit bff98bfc authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap

Fixes a bootstrapping issue for some registers when a less commonly used
method for register cache initialisation is used.  Only affects a fairly
small proportion of users that both don't use explicit register defaults
and do use the cache.

* tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap:
  regmap: Fix cache defaults initialization from raw cache defaults
parents 46860666 61cddc57
...@@ -53,7 +53,7 @@ static int regcache_hw_init(struct regmap *map) ...@@ -53,7 +53,7 @@ static int regcache_hw_init(struct regmap *map)
for (count = 0, i = 0; i < map->num_reg_defaults_raw; i++) { for (count = 0, i = 0; i < map->num_reg_defaults_raw; i++) {
val = regcache_get_val(map->reg_defaults_raw, val = regcache_get_val(map->reg_defaults_raw,
i, map->cache_word_size); i, map->cache_word_size);
if (!val) if (regmap_volatile(map, i))
continue; continue;
count++; count++;
} }
...@@ -70,7 +70,7 @@ static int regcache_hw_init(struct regmap *map) ...@@ -70,7 +70,7 @@ static int regcache_hw_init(struct regmap *map)
for (i = 0, j = 0; i < map->num_reg_defaults_raw; i++) { for (i = 0, j = 0; i < map->num_reg_defaults_raw; i++) {
val = regcache_get_val(map->reg_defaults_raw, val = regcache_get_val(map->reg_defaults_raw,
i, map->cache_word_size); i, map->cache_word_size);
if (!val) if (regmap_volatile(map, i))
continue; continue;
map->reg_defaults[j].reg = i; map->reg_defaults[j].reg = i;
map->reg_defaults[j].def = val; map->reg_defaults[j].def = val;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment