Skip to content

Commit

Permalink
ASoC: arizona: No need to update_bits when writing AEC clock control
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Richard Fitzgerald authored and Mark Brown committed Apr 26, 2016
1 parent 8e42db1 commit 2ab8e74
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions sound/soc/codecs/arizona.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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;
}
Expand Down

0 comments on commit 2ab8e74

Please sign in to comment.