regmap: Skip read-only registers in regcache_sync()
authorTakashi Iwai <tiwai@suse.de>
Wed, 4 Mar 2015 14:29:17 +0000 (15:29 +0100)
committerMark Brown <broonie@kernel.org>
Wed, 4 Mar 2015 17:08:59 +0000 (17:08 +0000)
commit4ceba98d3fe204c59e5f63c4d834b45dcfe789f0
tree8698c8fa656396700113528e65c6b0bf3825407b
parentc517d838eb7d07bbe9507871fab3931deccff539
regmap: Skip read-only registers in regcache_sync()

regcache_sync() spews warnings when a value was cached for a read-only
register as it tries to write all registers no matter whether they are
writable or not.  This patch adds regmap_wrtieable() checks for
avoiding it in regcache_sync_block_single() and regcache_block_raw().

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/base/regmap/regcache.c