linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] phy: ti-pipe3: Simplify ti_pipe3_dpll_wait_lock implementation
@ 2015-03-03 12:04 Axel Lin
  2015-03-03 12:57 ` Roger Quadros
  0 siblings, 1 reply; 2+ messages in thread
From: Axel Lin @ 2015-03-03 12:04 UTC (permalink / raw)
  To: Kishon Vijay Abraham I; +Cc: Roger Quadros, Vignesh R, linux-kernel

Code simplification. No functional change.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
 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




^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] phy: ti-pipe3: Simplify ti_pipe3_dpll_wait_lock implementation
  2015-03-03 12:04 [PATCH] phy: ti-pipe3: Simplify ti_pipe3_dpll_wait_lock implementation Axel Lin
@ 2015-03-03 12:57 ` Roger Quadros
  0 siblings, 0 replies; 2+ messages in thread
From: Roger Quadros @ 2015-03-03 12:57 UTC (permalink / raw)
  To: Axel Lin, Kishon Vijay Abraham I; +Cc: Vignesh R, linux-kernel

On 03/03/15 14:04, Axel Lin wrote:
> Code simplification. No functional change.
> 
> Signed-off-by: Axel Lin <axel.lin@ingics.com>

Acked-by: Roger Quadros <rogerq@ti.com>

cheers,
-roger

> ---
>  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)
> 


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-03-03 12:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-03 12:04 [PATCH] phy: ti-pipe3: Simplify ti_pipe3_dpll_wait_lock implementation Axel Lin
2015-03-03 12:57 ` Roger Quadros

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).