diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-03-14 14:14:24 +0100 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2012-03-14 14:14:24 +0100 |
commit | 4a6be7bb7474500a69f6d8f25899b8038491bdbb (patch) | |
tree | a2645b0f707fcf1ea94a9e7ef7a59b298fb5ecac /drivers/base/regmap/regcache-lzo.c | |
parent | Merge remote-tracking branch 'regmap/topic/drivers' into regmap-next (diff) | |
parent | regmap: Fix rbtree block base in sync (diff) | |
download | linux-4a6be7bb7474500a69f6d8f25899b8038491bdbb.tar.xz linux-4a6be7bb7474500a69f6d8f25899b8038491bdbb.zip |
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.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/base/regmap/regcache-lzo.c b/drivers/base/regmap/regcache-lzo.c index 3025cf920f25..8d0061569326 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; |