Commit 3451eb48 authored by Richard Fitzgerald's avatar Richard Fitzgerald Committed by Mark Brown

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: default avatarRichard Fitzgerald <rf@opensource.wolfsonmicro.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 1f0e1eae
...@@ -2020,18 +2020,18 @@ static int arizona_calc_fratio(struct arizona_fll *fll, ...@@ -2020,18 +2020,18 @@ static int arizona_calc_fratio(struct arizona_fll *fll,
} }
switch (fll->arizona->type) { switch (fll->arizona->type) {
case WM5102:
case WM8997:
return init_ratio;
case WM5110: case WM5110:
case WM8280: case WM8280:
if (fll->arizona->rev < 3 || sync) if (fll->arizona->rev < 3 || sync)
return init_ratio; return init_ratio;
break; break;
case WM8998: default:
case WM1814:
if (sync) if (sync)
return init_ratio; return init_ratio;
break; break;
default:
return init_ratio;
} }
cfg->fratio = init_ratio - 1; cfg->fratio = init_ratio - 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment