]> git.baikalelectronics.ru Git - kernel.git/commit
regmap: cache: Make sure to sync the last register in a block
authorLars-Peter Clausen <lars@metafoo.de>
Mon, 5 Aug 2013 09:21:29 +0000 (11:21 +0200)
committerMark Brown <broonie@linaro.org>
Mon, 5 Aug 2013 14:51:09 +0000 (15:51 +0100)
commitdabde2bd57993bdb3e9e92bb74f92591be73b21d
tree4c77babeb293d2880bc7938dbcd7b4971a526f89
parentd33c3cb0da597300ed26282fd9cb264be06085c0
regmap: cache: Make sure to sync the last register in a block

regcache_sync_block_raw_flush() expects the address of the register after last
register that needs to be synced as its parameter. But the last call to
regcache_sync_block_raw_flush() in regcache_sync_block_raw() passes the address
of the last register in the block. This effectively always skips over the last
register in a block, even if it needs to be synced. In order to fix it increase
the address by one register.

The issue was introduced in commit 014de6f ("regmap: cache: Write consecutive
registers in a single block write").

Cc: stable@vger.kernel.org # 3.10+
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
drivers/base/regmap/regcache.c