regmap: cache: cleanup regcache_hw_init()
Remove the redundant code for regmap cache. Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com> Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
f114040e3e
commit
5bd83ed098
1 changed files with 3 additions and 6 deletions
|
@ -57,12 +57,9 @@ static int regcache_hw_init(struct regmap *map)
|
||||||
}
|
}
|
||||||
|
|
||||||
/* calculate the size of reg_defaults */
|
/* calculate the size of reg_defaults */
|
||||||
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, map->reg_defaults_raw, i);
|
if (!regmap_volatile(map, i * map->reg_stride))
|
||||||
if (regmap_volatile(map, i * map->reg_stride))
|
|
||||||
continue;
|
|
||||||
count++;
|
count++;
|
||||||
}
|
|
||||||
|
|
||||||
map->reg_defaults = kmalloc(count * sizeof(struct reg_default),
|
map->reg_defaults = kmalloc(count * sizeof(struct reg_default),
|
||||||
GFP_KERNEL);
|
GFP_KERNEL);
|
||||||
|
|
Loading…
Add table
Reference in a new issue