aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base/regmap/regcache-lzo.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2012-03-14 13:14:24 +0000
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-03-14 13:14:24 +0000
commit4a6be7bb7474500a69f6d8f25899b8038491bdbb (patch)
treea2645b0f707fcf1ea94a9e7ef7a59b298fb5ecac /drivers/base/regmap/regcache-lzo.c
parent7d9aca39dcacd2b3f42e2e287162329f410f93e1 (diff)
parentf9353e70bcebd00cd182d946083afd7d8eddd259 (diff)
downloadkernel_goldelico_gta04-4a6be7bb7474500a69f6d8f25899b8038491bdbb.zip
kernel_goldelico_gta04-4a6be7bb7474500a69f6d8f25899b8038491bdbb.tar.gz
kernel_goldelico_gta04-4a6be7bb7474500a69f6d8f25899b8038491bdbb.tar.bz2
Merge remote-tracking branches 'regmap/topic/patch' and 'regmap/topic/sync' into regmap-next
Diffstat (limited to 'drivers/base/regmap/regcache-lzo.c')
-rw-r--r--drivers/base/regmap/regcache-lzo.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/base/regmap/regcache-lzo.c b/drivers/base/regmap/regcache-lzo.c
index 3025cf9..8d00615 100644
--- a/drivers/base/regmap/regcache-lzo.c
+++ b/drivers/base/regmap/regcache-lzo.c
@@ -331,7 +331,8 @@ out:
return ret;
}
-static int regcache_lzo_sync(struct regmap *map)
+static int regcache_lzo_sync(struct regmap *map, unsigned int min,
+ unsigned int max)
{
struct regcache_lzo_ctx **lzo_blocks;
unsigned int val;
@@ -339,7 +340,12 @@ static int regcache_lzo_sync(struct regmap *map)
int ret;
lzo_blocks = map->cache;
- for_each_set_bit(i, lzo_blocks[0]->sync_bmp, lzo_blocks[0]->sync_bmp_nbits) {
+ i = min;
+ for_each_set_bit_cont(i, lzo_blocks[0]->sync_bmp,
+ lzo_blocks[0]->sync_bmp_nbits) {
+ if (i > max)
+ continue;
+
ret = regcache_read(map, i, &val);
if (ret)
return ret;