ASoC: da7210: Minor update for PLL and SRM
This patch converts multiple if conditions in to single if with "&&"s. Signed-off-by: Ashish Chavan <ashish.chavan@kpitcummins.com> Signed-off-by: David Dajun Chen <dchen@diasemi.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This commit is contained in:
parent
570aa7bae5
commit
c4b14e70a1
1 changed files with 9 additions and 13 deletions
|
@ -992,19 +992,15 @@ static int da7210_set_dai_pll(struct snd_soc_dai *codec_dai, int pll_id,
|
||||||
|
|
||||||
/* Search pll div array for correct divisors */
|
/* Search pll div array for correct divisors */
|
||||||
for (cnt = 0; cnt < ARRAY_SIZE(da7210_pll_div); cnt++) {
|
for (cnt = 0; cnt < ARRAY_SIZE(da7210_pll_div); cnt++) {
|
||||||
/* check fref */
|
/* check fref, mode and fout */
|
||||||
if (fref == da7210_pll_div[cnt].fref) {
|
if ((fref == da7210_pll_div[cnt].fref) &&
|
||||||
/* check mode */
|
(da7210->master == da7210_pll_div[cnt].mode) &&
|
||||||
if (da7210->master == da7210_pll_div[cnt].mode) {
|
(fout == da7210_pll_div[cnt].fout)) {
|
||||||
/* check fout */
|
/* all match, pick up divisors */
|
||||||
if (fout == da7210_pll_div[cnt].fout) {
|
pll_div1 = da7210_pll_div[cnt].div1;
|
||||||
/* all match, pick up divisors */
|
pll_div2 = da7210_pll_div[cnt].div2;
|
||||||
pll_div1 = da7210_pll_div[cnt].div1;
|
pll_div3 = da7210_pll_div[cnt].div3;
|
||||||
pll_div2 = da7210_pll_div[cnt].div2;
|
break;
|
||||||
pll_div3 = da7210_pll_div[cnt].div3;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (cnt >= ARRAY_SIZE(da7210_pll_div))
|
if (cnt >= ARRAY_SIZE(da7210_pll_div))
|
||||||
|
|
Loading…
Add table
Reference in a new issue