regmap: cache: speed regcache_hw_init() up.

This may speed regcache_hw_init() up for some cases that there
has volatile registers.

Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
Xiubo Li 2014-10-09 17:02:55 +08:00 коммит произвёл Mark Brown
Родитель ba3f1c85a6
Коммит fbba43c527
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -71,9 +71,9 @@ static int regcache_hw_init(struct regmap *map)
/* fill the reg_defaults */
map->num_reg_defaults = count;
for (i = 0, j = 0; i < map->num_reg_defaults_raw; i++) {
val = regcache_get_val(map, map->reg_defaults_raw, i);
if (regmap_volatile(map, i * map->reg_stride))
continue;
val = regcache_get_val(map, map->reg_defaults_raw, i);
map->reg_defaults[j].reg = i * map->reg_stride;
map->reg_defaults[j].def = val;
j++;