]> git.baikalelectronics.ru Git - kernel.git/commit
ASoC: Fix register cache sync register_writable WARN_ONs
authorLars-Peter Clausen <lars@metafoo.de>
Sat, 27 Aug 2011 16:24:13 +0000 (18:24 +0200)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Wed, 31 Aug 2011 08:46:16 +0000 (09:46 +0100)
commitc25409665d4bd17438a4344d6702792a6fff9284
tree475410b3da2b4189a91b54c9cee90ae8a36e2fab
parent1e318f6d725f58b6cc791383e359d0611538636c
ASoC: Fix register cache sync register_writable WARN_ONs

Currently the condition for these WARN_ONs is reversed and they are placed
before the actual check whether we are going to write to that register. So if
the codec implements the register_writable callback we'll get a warning for each
writable register when syncing the register cache.

While we are at it change the check to use snd_soc_codec_writable_register
instead of open-coding it.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Liam Girdwood <lrg@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/soc-cache.c