summaryrefslogtreecommitdiff
path: root/drivers/base/regmap
diff options
context:
space:
mode:
authorXiubo Li <Li.Xiubo@freescale.com>2014-10-09 13:02:55 +0400
committerMark Brown <broonie@kernel.org>2014-10-20 15:25:01 +0400
commitfbba43c527d851088a891ed83346d5cc9f095b64 (patch)
treee545a123212619e2ec81e8de7f19f02f6957a4d6 /drivers/base/regmap
parentba3f1c85a6e05e0ff90215d817249617fcbee523 (diff)
downloadlinux-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')
-rw-r--r--drivers/base/regmap/regcache.c2
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++;