ASoC: max9877: Update register if either val or val2 is changed
authorAxel Lin <axel.lin@gmail.com>
Tue, 22 Nov 2011 06:47:44 +0000 (14:47 +0800)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Tue, 22 Nov 2011 13:06:21 +0000 (13:06 +0000)
commit5c4b2aa3fd1dc30af098de5dec766a817621ace2
treee30d44721abb95d6f6945437c27138218fc2ba8c
parent72531c9434fa884d20cb3c36fcec83752f32fdf4
ASoC: max9877: Update register if either val or val2 is changed

In the case of ((max9877_regs[reg] >> shift) & mask) != val
but ((max9877_regs[reg2] >> shift) & mask) == val2,
current code does not update the registers.

Fix the logic to update registers if either val or val2 is changed.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/codecs/max9877.c