Skip to content

Commit

Permalink
ASoC: sirf-audio-codec: Simplify the new bitmask value in regmap_upda…
Browse files Browse the repository at this point in the history
…te_bits

Having the binary ones complement operator in the new bitmak value makes the
code hard to read.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
  • Loading branch information
Axel Lin authored and Mark Brown committed May 26, 2014
1 parent b87704c commit 772bc59
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions sound/soc/codecs/sirf-audio-codec.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ static void enable_and_reset_codec(struct regmap *regmap,
{
regmap_update_bits(regmap, AUDIO_IC_CODEC_CTRL1,
codec_enable_bits | codec_reset_bits,
codec_enable_bits | ~codec_reset_bits);
codec_enable_bits);
msleep(20);
regmap_update_bits(regmap, AUDIO_IC_CODEC_CTRL1,
codec_reset_bits, codec_reset_bits);
Expand All @@ -128,8 +128,7 @@ static int atlas6_codec_enable_and_reset_event(struct snd_soc_dapm_widget *w,
break;
case SND_SOC_DAPM_POST_PMD:
regmap_update_bits(sirf_audio_codec->regmap,
AUDIO_IC_CODEC_CTRL1, ATLAS6_CODEC_ENABLE_BITS,
~ATLAS6_CODEC_ENABLE_BITS);
AUDIO_IC_CODEC_CTRL1, ATLAS6_CODEC_ENABLE_BITS, 0);
break;
default:
break;
Expand All @@ -151,8 +150,7 @@ static int prima2_codec_enable_and_reset_event(struct snd_soc_dapm_widget *w,
break;
case SND_SOC_DAPM_POST_PMD:
regmap_update_bits(sirf_audio_codec->regmap,
AUDIO_IC_CODEC_CTRL1, PRIMA2_CODEC_ENABLE_BITS,
~PRIMA2_CODEC_ENABLE_BITS);
AUDIO_IC_CODEC_CTRL1, PRIMA2_CODEC_ENABLE_BITS, 0);
break;
default:
break;
Expand Down

0 comments on commit 772bc59

Please sign in to comment.