diff options
author | Axel Lin <axel.lin@ingics.com> | 2016-12-03 02:10:50 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2016-12-06 07:22:28 -0500 |
commit | 914657c2be09fb89a50c7841e98186301c93767e (patch) | |
tree | 7702fbf158bb00b90889a14191fac414a6b017c2 | |
parent | 55060feefcdff692ace47b1a2346998dfcd4bcb5 (diff) |
ASoC: cs35l34: Simplify the logic to set CS35L34_MCLK_CTL setting
The logic of "value = ~CS35L34_MCLK_DIV & CS35L34_MCLK_RATE_XXXXXX;" is
unnecessary complex. By setting CS35L34_MCLK_DIV | CS35L34_MCLK_RATE_MASK
as the mask for regmap_update_bits() call, what the code does is exactly
the same as setting value = CS35L34_MCLK_RATE_XXXXXX.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Paul Handrigan <Paul.Handrigan@cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | sound/soc/codecs/cs35l34.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/soc/codecs/cs35l34.c b/sound/soc/codecs/cs35l34.c index e0f672af1d84..7c5d1510cf2c 100644 --- a/sound/soc/codecs/cs35l34.c +++ b/sound/soc/codecs/cs35l34.c | |||
@@ -610,15 +610,15 @@ static int cs35l34_dai_set_sysclk(struct snd_soc_dai *dai, | |||
610 | 610 | ||
611 | switch (freq) { | 611 | switch (freq) { |
612 | case CS35L34_MCLK_5644: | 612 | case CS35L34_MCLK_5644: |
613 | value = ~CS35L34_MCLK_DIV & CS35L34_MCLK_RATE_5P6448; | 613 | value = CS35L34_MCLK_RATE_5P6448; |
614 | cs35l34->mclk_int = freq; | 614 | cs35l34->mclk_int = freq; |
615 | break; | 615 | break; |
616 | case CS35L34_MCLK_6: | 616 | case CS35L34_MCLK_6: |
617 | value = ~CS35L34_MCLK_DIV & CS35L34_MCLK_RATE_6P0000; | 617 | value = CS35L34_MCLK_RATE_6P0000; |
618 | cs35l34->mclk_int = freq; | 618 | cs35l34->mclk_int = freq; |
619 | break; | 619 | break; |
620 | case CS35L34_MCLK_6144: | 620 | case CS35L34_MCLK_6144: |
621 | value = ~CS35L34_MCLK_DIV & CS35L34_MCLK_RATE_6P1440; | 621 | value = CS35L34_MCLK_RATE_6P1440; |
622 | cs35l34->mclk_int = freq; | 622 | cs35l34->mclk_int = freq; |
623 | break; | 623 | break; |
624 | case CS35L34_MCLK_11289: | 624 | case CS35L34_MCLK_11289: |