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
Unified · Split
| @@ -53,7 +53,7 @@ static int regcache_hw_init(struct regmap *map) · 52 unmodified lines | |||
| 53 | for (count = 0, i = 0; i < map->num_reg_defaults_raw; i++) { | 53 | for (count = 0, i = 0; i < map->num_reg_defaults_raw; i++) { |
| 54 | val = regcache_get_val(map->reg_defaults_raw, | 54 | val = regcache_get_val(map->reg_defaults_raw, |
| 55 | i, map->cache_word_size); | 55 | i, map->cache_word_size); |
| 56 | if (!val) | 56 | if (regmap_volatile(map, i)) |
| 57 | continue; | 57 | continue; |
| 58 | count++; | 58 | count++; |
| 59 | } | 59 | } |
| @@ -70,7 +70,7 @@ static int regcache_hw_init(struct regmap *map) · 10 unmodified lines | |||
| 70 | for (i = 0, j = 0; i < map->num_reg_defaults_raw; i++) { | 70 | for (i = 0, j = 0; i < map->num_reg_defaults_raw; i++) { |
| 71 | val = regcache_get_val(map->reg_defaults_raw, | 71 | val = regcache_get_val(map->reg_defaults_raw, |
| 72 | i, map->cache_word_size); | 72 | i, map->cache_word_size); |
| 73 | if (!val) | 73 | if (regmap_volatile(map, i)) |
| 74 | continue; | 74 | continue; |
| 75 | map->reg_defaults[j].reg = i; | 75 | map->reg_defaults[j].reg = i; |
| 76 | map->reg_defaults[j].def = val; | 76 | map->reg_defaults[j].def = val; |