regmap: Ensure rbtree syncs registers set to zero properly
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Sun, 9 Oct 2011 11:54:25 +0000 (12:54 +0100)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Mon, 10 Oct 2011 09:26:48 +0000 (10:26 +0100)
commitb03622a80d2206c4179d6a41a0dc5cfbdfc853ee
tree7f0e02bbddfd3930e3aabe553d9efb4c423c47fa
parente42c5a9a4230c38ceba0a890b30a2d0dd9314bff
regmap: Ensure rbtree syncs registers set to zero properly

Simplify the check for registers set at their default value by avoiding
picking a default value in the case where we don't have one. Instead we
only compare the current value to the current value when we looked one
up. This fixes the case where we don't have a default stored but the value
was set to zero when that isn't the chip default.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
drivers/base/regmap/regcache-rbtree.c