diff options
author | Richard Fitzgerald <rf@opensource.wolfsonmicro.com> | 2015-12-16 17:06:24 +0000 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-12-16 19:17:50 +0000 |
commit | 3451eb485aee78f31a8dd127e3385f89946c813b (patch) | |
tree | c36930bbbae35bdcdaabeb813b327d947deb4b3f /sound/soc/codecs/arizona.c | |
parent | 1f0e1eae1521e9a00f1dfbcf7c51d785ade4179c (diff) | |
download | linux-stable-3451eb485aee78f31a8dd127e3385f89946c813b.tar.gz linux-stable-3451eb485aee78f31a8dd127e3385f89946c813b.tar.bz2 linux-stable-3451eb485aee78f31a8dd127e3385f89946c813b.zip |
ASoC: arizona: In arizona_calc_fratio make new codecs the default case
This patch rearranges the switch statement in arizona_calc_fratio so
that older codecs are the special cases, with the default case
applying to newer codecs (WM8998 and later). This is preferable
because it avoids having to patch new cases in every time a new
codec is added.
Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/arizona.c')
-rw-r--r-- | sound/soc/codecs/arizona.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sound/soc/codecs/arizona.c b/sound/soc/codecs/arizona.c index d90b3c51019a..38a73e3da508 100644 --- a/sound/soc/codecs/arizona.c +++ b/sound/soc/codecs/arizona.c @@ -2020,18 +2020,18 @@ static int arizona_calc_fratio(struct arizona_fll *fll, } switch (fll->arizona->type) { + case WM5102: + case WM8997: + return init_ratio; case WM5110: case WM8280: if (fll->arizona->rev < 3 || sync) return init_ratio; break; - case WM8998: - case WM1814: + default: if (sync) return init_ratio; break; - default: - return init_ratio; } cfg->fratio = init_ratio - 1; |