ASoC: da7210: Minor update for PLL and SRM
authorAshish Chavan <ashish.chavan@kpitcummins.com>
Tue, 17 Apr 2012 15:37:44 +0000 (21:07 +0530)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Tue, 17 Apr 2012 19:52:42 +0000 (20:52 +0100)
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>
sound/soc/codecs/da7210.c

index 65e666e630d7571f3b5527ce028b16d06a1aa3d5..f92d1f7777571ecdeb5b2833cbefef2fcdd60e36 100644 (file)
@@ -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 */
        for (cnt = 0; cnt < ARRAY_SIZE(da7210_pll_div); cnt++) {
-               /* check fref */
-               if (fref == da7210_pll_div[cnt].fref) {
-                       /* check mode */
-                        if (da7210->master ==  da7210_pll_div[cnt].mode) {
-                               /* check fout */
-                               if (fout == da7210_pll_div[cnt].fout) {
-                                       /* all match, pick up divisors */
-                                       pll_div1 = da7210_pll_div[cnt].div1;
-                                       pll_div2 = da7210_pll_div[cnt].div2;
-                                       pll_div3 = da7210_pll_div[cnt].div3;
-                                       break;
-                               }
-                       }
+               /* check fref, mode  and fout */
+               if ((fref == da7210_pll_div[cnt].fref) &&
+                   (da7210->master ==  da7210_pll_div[cnt].mode) &&
+                   (fout == da7210_pll_div[cnt].fout)) {
+                       /* all match, pick up divisors */
+                       pll_div1 = da7210_pll_div[cnt].div1;
+                       pll_div2 = da7210_pll_div[cnt].div2;
+                       pll_div3 = da7210_pll_div[cnt].div3;
+                       break;
                }
        }
        if (cnt >= ARRAY_SIZE(da7210_pll_div))