summaryrefslogtreecommitdiffstats
path: root/drivers/base/regmap/regcache-lzo.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2013-02-21 19:03:13 +0100
committerMark Brown <broonie@opensource.wolfsonmicro.com>2013-03-04 03:30:27 +0100
commit879082c9fe6e8fbddf787170eee605e4be138d0f (patch)
tree90d721437b67177dae4a2e84348002d74835710d /drivers/base/regmap/regcache-lzo.c
parentregmap: rbtree: Don't bother checking for noop updates (diff)
downloadlinux-879082c9fe6e8fbddf787170eee605e4be138d0f.tar.xz
linux-879082c9fe6e8fbddf787170eee605e4be138d0f.zip
regmap: cache: Pass the map rather than the word size when updating values
It's more idiomatic to pass the map structure around and this means we can use other bits of information from the map. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/base/regmap/regcache-lzo.c')
-rw-r--r--drivers/base/regmap/regcache-lzo.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/base/regmap/regcache-lzo.c b/drivers/base/regmap/regcache-lzo.c
index afd6aa91a0df..e210a6d1406a 100644
--- a/drivers/base/regmap/regcache-lzo.c
+++ b/drivers/base/regmap/regcache-lzo.c
@@ -260,8 +260,7 @@ static int regcache_lzo_read(struct regmap *map,
ret = regcache_lzo_decompress_cache_block(map, lzo_block);
if (ret >= 0)
/* fetch the value from the cache */
- *value = regcache_get_val(lzo_block->dst, blkpos,
- map->cache_word_size);
+ *value = regcache_get_val(map, lzo_block->dst, blkpos);
kfree(lzo_block->dst);
/* restore the pointer and length of the compressed block */
@@ -304,8 +303,7 @@ static int regcache_lzo_write(struct regmap *map,
}
/* write the new value to the cache */
- if (regcache_set_val(lzo_block->dst, blkpos, value,
- map->cache_word_size)) {
+ if (regcache_set_val(map, lzo_block->dst, blkpos, value)) {
kfree(lzo_block->dst);
goto out;
}