Commit c4b14e70 authored by Ashish Chavan's avatar Ashish Chavan Committed by Mark Brown
Browse files

ASoC: da7210: Minor update for PLL and SRM



This patch converts multiple if conditions in to single if with "&&"s.

Signed-off-by: default avatarAshish Chavan <ashish.chavan@kpitcummins.com>
Signed-off-by: default avatarDavid Dajun Chen <dchen@diasemi.com>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent 570aa7ba
Loading
Loading
Loading
Loading
+9 −13
Original line number Original line Diff line number Diff line
@@ -992,12 +992,10 @@ 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 */
				if (fout == da7210_pll_div[cnt].fout) {
			/* all match, pick up divisors */
			/* all match, pick up divisors */
			pll_div1 = da7210_pll_div[cnt].div1;
			pll_div1 = da7210_pll_div[cnt].div1;
			pll_div2 = da7210_pll_div[cnt].div2;
			pll_div2 = da7210_pll_div[cnt].div2;
@@ -1005,8 +1003,6 @@ static int da7210_set_dai_pll(struct snd_soc_dai *codec_dai, int pll_id,
			break;
			break;
		}
		}
	}
	}
		}
	}
	if (cnt >= ARRAY_SIZE(da7210_pll_div))
	if (cnt >= ARRAY_SIZE(da7210_pll_div))
		goto err;
		goto err;