Commit fbba43c5 authored by Xiubo Li's avatar Xiubo Li Committed by Mark Brown
Browse files

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: default avatarXiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent ba3f1c85
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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++;