summaryrefslogtreecommitdiff
path: root/drivers/base/regmap/regcache.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2013-03-13 23:29:36 +0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2013-03-27 01:38:16 +0400
commit8817796b75c8847d63d6d4523c79c24b47748a05 (patch)
treeafa323b0fc93ec618da94bc54b40c2047c8a422c /drivers/base/regmap/regcache.c
parent0c7ed8563a0282c032936ae1c667498d59691593 (diff)
downloadlinux-8817796b75c8847d63d6d4523c79c24b47748a05.tar.xz
regmap: cache: Provide a get address of value operation
Provide a helper to do the size based index into a block of registers and use it when reading a value. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/base/regmap/regcache.c')
-rw-r--r--drivers/base/regmap/regcache.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/base/regmap/regcache.c b/drivers/base/regmap/regcache.c
index 0f4fb8bc37e5..229c804e409e 100644
--- a/drivers/base/regmap/regcache.c
+++ b/drivers/base/regmap/regcache.c
@@ -458,8 +458,8 @@ unsigned int regcache_get_val(struct regmap *map, const void *base,
/* Use device native format if possible */
if (map->format.parse_val)
- return map->format.parse_val(base +
- (map->cache_word_size * idx));
+ return map->format.parse_val(regcache_get_val_addr(map, base,
+ idx));
switch (map->cache_word_size) {
case 1: {