diff options
author | Mark Brown <broonie@linaro.org> | 2014-03-28 07:50:39 -0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-03-28 07:50:39 -0400 |
commit | 6ce6d9c214c9752c7bcebba91ef2302176842870 (patch) | |
tree | cd6b226f538072c600a9f294409633700b327ad3 /drivers/base | |
parent | b098d6726bbfb94c06d6e1097466187afddae61f (diff) | |
parent | 78ba73eecd2256790926859849801c0446766c0a (diff) |
Merge tag 'regmap-v3.14-rc4' into regmap-linus
regmap: Fix for v3.14
One fix here, for syncing the last register in a cache block when the
register map has a stride. This is a fairly unusual hardware
configuration and the fact that it only affects the last register in a
block makes the issue rarer still.
# gpg: Signature made Sun 23 Feb 2014 04:36:37 GMT using RSA key ID 7EA229BD
# gpg: Good signature from "Mark Brown <broonie@sirena.org.uk>"
# gpg: aka "Mark Brown <broonie@debian.org>"
# gpg: aka "Mark Brown <broonie@kernel.org>"
# gpg: aka "Mark Brown <broonie@tardis.ed.ac.uk>"
# gpg: aka "Mark Brown <broonie@linaro.org>"
# gpg: aka "Mark Brown <Mark.Brown@linaro.org>"
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/regmap/regcache.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/base/regmap/regcache.c b/drivers/base/regmap/regcache.c index d4dd77134814..dd56177b7010 100644 --- a/drivers/base/regmap/regcache.c +++ b/drivers/base/regmap/regcache.c | |||
@@ -636,10 +636,10 @@ static int regcache_sync_block_raw_flush(struct regmap *map, const void **data, | |||
636 | if (*data == NULL) | 636 | if (*data == NULL) |
637 | return 0; | 637 | return 0; |
638 | 638 | ||
639 | count = cur - base; | 639 | count = (cur - base) / map->reg_stride; |
640 | 640 | ||
641 | dev_dbg(map->dev, "Writing %zu bytes for %d registers from 0x%x-0x%x\n", | 641 | dev_dbg(map->dev, "Writing %zu bytes for %d registers from 0x%x-0x%x\n", |
642 | count * val_bytes, count, base, cur - 1); | 642 | count * val_bytes, count, base, cur - map->reg_stride); |
643 | 643 | ||
644 | map->cache_bypass = 1; | 644 | map->cache_bypass = 1; |
645 | 645 | ||