summaryrefslogtreecommitdiffstats
path: root/drivers/base
diff options
context:
space:
mode:
authorXiubo Li <Li.Xiubo@freescale.com>2014-10-09 17:02:53 +0800
committerMark Brown <broonie@kernel.org>2014-10-20 12:25:01 +0100
commit5bd83ed0984b0b0ac51d648b0ec167b36291f87e (patch)
tree7f63bf44cca2f17ec77a4a4bf18495777adc13c7 /drivers/base
parentf114040e3ea6e07372334ade75d1ee0775c355e1 (diff)
downloadop-kernel-dev-5bd83ed0984b0b0ac51d648b0ec167b36291f87e.zip
op-kernel-dev-5bd83ed0984b0b0ac51d648b0ec167b36291f87e.tar.gz
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>
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/regmap/regcache.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/base/regmap/regcache.c b/drivers/base/regmap/regcache.c
index f1280dc..7558e6b 100644
--- a/drivers/base/regmap/regcache.c
+++ b/drivers/base/regmap/regcache.c
@@ -57,12 +57,9 @@ static int regcache_hw_init(struct regmap *map)
}
/* calculate the size of reg_defaults */
- 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))
- continue;
- count++;
- }
+ for (count = 0, i = 0; i < map->num_reg_defaults_raw; i++)
+ if (!regmap_volatile(map, i * map->reg_stride))
+ count++;
map->reg_defaults = kmalloc(count * sizeof(struct reg_default),
GFP_KERNEL);
OpenPOWER on IntegriCloud