ASoC: arizona: No need to update_bits when writing AEC clock control
authorRichard Fitzgerald <rf@opensource.wolfsonmicro.com>
Tue, 26 Apr 2016 16:06:20 +0000 (17:06 +0100)
committerMark Brown <broonie@kernel.org>
Tue, 26 Apr 2016 16:37:30 +0000 (17:37 +0100)
The bits in the ARIZONA_CLOCK_CONTROL register only respond to writes of
a '1', a write of '0' is ignored. So there's no need to use update_bits.
We can do a simple write to set bits.

Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/arizona.c

index 0caecc6..0239639 100644 (file)
@@ -1124,7 +1124,6 @@ int arizona_anc_ev(struct snd_soc_dapm_widget *w,
                   int event)
 {
        struct snd_soc_codec *codec = snd_soc_dapm_to_codec(w->dapm);
-       unsigned int mask = 0x3 << w->shift;
        unsigned int val;
 
        switch (event) {
@@ -1138,7 +1137,7 @@ int arizona_anc_ev(struct snd_soc_dapm_widget *w,
                return 0;
        }
 
-       snd_soc_update_bits(codec, ARIZONA_CLOCK_CONTROL, mask, val);
+       snd_soc_write(codec, ARIZONA_CLOCK_CONTROL, val);
 
        return 0;
 }