phy: ti-pipe3: Simplify ti_pipe3_dpll_wait_lock implementation
authorAxel Lin <axel.lin@ingics.com>
Tue, 3 Mar 2015 12:04:55 +0000 (20:04 +0800)
committerKishon Vijay Abraham I <kishon@ti.com>
Thu, 12 Mar 2015 05:31:17 +0000 (11:01 +0530)
Code simplification. No functional change.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
drivers/phy/phy-ti-pipe3.c

index 95c88f929f27f7d4113961e90215f3e769fe75f5..ed72b0d01ddeb6b200ef5a98465dc3628a18534f 100644 (file)
@@ -165,15 +165,11 @@ static int ti_pipe3_dpll_wait_lock(struct ti_pipe3 *phy)
                cpu_relax();
                val = ti_pipe3_readl(phy->pll_ctrl_base, PLL_STATUS);
                if (val & PLL_LOCK)
-                       break;
+                       return 0;
        } while (!time_after(jiffies, timeout));
 
-       if (!(val & PLL_LOCK)) {
-               dev_err(phy->dev, "DPLL failed to lock\n");
-               return -EBUSY;
-       }
-
-       return 0;
+       dev_err(phy->dev, "DPLL failed to lock\n");
+       return -EBUSY;
 }
 
 static int ti_pipe3_dpll_program(struct ti_pipe3 *phy)