History

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

Linus Torvalds committed 14 years ago

Commit bff98bf2 parents 4686066 61cddc51 file · +2 −2Browse files

Unified · Split

drivers/base/regmap/regcache.c+2−2
@@ -53,7 +53,7 @@ static int regcache_hw_init(struct regmap *map) · 52 unmodified lines
5353 for (count = 0, i = 0; i < map->num_reg_defaults_raw; i++) {
5454 val = regcache_get_val(map->reg_defaults_raw,
5555 i, map->cache_word_size);
56− if (!val)
56+ if (regmap_volatile(map, i))
5757 continue;
5858 count++;
5959 }
@@ -70,7 +70,7 @@ static int regcache_hw_init(struct regmap *map) · 10 unmodified lines
7070 for (i = 0, j = 0; i < map->num_reg_defaults_raw; i++) {
7171 val = regcache_get_val(map->reg_defaults_raw,
7272 i, map->cache_word_size);
73− if (!val)
73+ if (regmap_volatile(map, i))
7474 continue;
7575 map->reg_defaults[j].reg = i;
7676 map->reg_defaults[j].def = val;