diff options
author | Xiubo Li <Li.Xiubo@freescale.com> | 2014-10-09 13:02:55 +0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2014-10-20 15:25:01 +0400 |
commit | fbba43c527d851088a891ed83346d5cc9f095b64 (patch) | |
tree | e545a123212619e2ec81e8de7f19f02f6957a4d6 /drivers/base/regmap/regcache.c | |
parent | ba3f1c85a6e05e0ff90215d817249617fcbee523 (diff) | |
download | linux-fbba43c527d851088a891ed83346d5cc9f095b64.tar.xz |
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>
Diffstat (limited to 'drivers/base/regmap/regcache.c')
-rw-r--r-- | drivers/base/regmap/regcache.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/base/regmap/regcache.c b/drivers/base/regmap/regcache.c index 6bec659e35d9..0852c890b4b5 100644 --- a/drivers/base/regmap/regcache.c +++ b/drivers/base/regmap/regcache.c @@ -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++; |