X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=pandora-kernel.git;a=blobdiff_plain;f=drivers%2Fbase%2Fregmap%2Fregcache.c;h=637b7fab12f7ddc5e3e9e988a5bbec83dc928ccc;hp=afcfef838263e3cf9ec1067ce3b92625d4c3056a;hb=f9b25cf9637d13ef6852f595b1777dd676b3935b;hpb=c125d5e846894043361c0c89c1140be8fd6600b7 diff --git a/drivers/base/regmap/regcache.c b/drivers/base/regmap/regcache.c index afcfef838263..637b7fab12f7 100644 --- a/drivers/base/regmap/regcache.c +++ b/drivers/base/regmap/regcache.c @@ -11,6 +11,7 @@ */ #include +#include #include #include #include @@ -53,7 +54,7 @@ static int regcache_hw_init(struct regmap *map) for (count = 0, i = 0; i < map->num_reg_defaults_raw; i++) { val = regcache_get_val(map->reg_defaults_raw, i, map->cache_word_size); - if (!val) + if (regmap_volatile(map, i)) continue; count++; } @@ -68,7 +69,7 @@ static int regcache_hw_init(struct regmap *map) for (i = 0, j = 0; i < map->num_reg_defaults_raw; i++) { val = regcache_get_val(map->reg_defaults_raw, i, map->cache_word_size); - if (!val) + if (regmap_volatile(map, i)) continue; map->reg_defaults[j].reg = i; map->reg_defaults[j].def = val; @@ -293,7 +294,7 @@ EXPORT_SYMBOL_GPL(regcache_cache_only); * regcache_cache_bypass: Put a register map into cache bypass mode * * @map: map to configure - * @cache_bypass: flag if changes should not be written to the hardware + * @cache_bypass: flag if changes should not be written to the cache * * When a register map is marked with the cache bypass option, writes * to the register map API will only update the hardware and not the