From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932099AbbCCMFG (ORCPT ); Tue, 3 Mar 2015 07:05:06 -0500 Received: from mail-pd0-f173.google.com ([209.85.192.173]:35902 "EHLO mail-pd0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755235AbbCCMFE (ORCPT ); Tue, 3 Mar 2015 07:05:04 -0500 Message-ID: <1425384295.23394.0.camel@phoenix> Subject: [PATCH] phy: ti-pipe3: Simplify ti_pipe3_dpll_wait_lock implementation From: Axel Lin To: Kishon Vijay Abraham I Cc: Roger Quadros , Vignesh R , "linux-kernel@vger.kernel.org" Date: Tue, 03 Mar 2015 20:04:55 +0800 Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4-0ubuntu2 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Code simplification. No functional change. Signed-off-by: Axel Lin --- drivers/phy/phy-ti-pipe3.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/phy/phy-ti-pipe3.c b/drivers/phy/phy-ti-pipe3.c index 95c88f9..ed72b0d 100644 --- a/drivers/phy/phy-ti-pipe3.c +++ b/drivers/phy/phy-ti-pipe3.c @@ -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) -- 1.9.1