[1/2] clocksource/drivers/timer-of: Do not warn on deferred probe
diff mbox series

Message ID 20190821150241.31093-1-jonathanh@nvidia.com
State New
Headers show
Series
  • [1/2] clocksource/drivers/timer-of: Do not warn on deferred probe
Related show

Commit Message

Jon Hunter Aug. 21, 2019, 3:02 p.m. UTC
Deferred probe is an expected return value for clk_get() on many
platforms. The driver deals with it properly, so there's no need
to output a warning that may potentially confuse users.

Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
---
 drivers/clocksource/timer-of.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Comments

Daniel Lezcano Aug. 22, 2019, 6:06 a.m. UTC | #1
On 21/08/2019 17:02, Jon Hunter wrote:
> Deferred probe is an expected return value for clk_get() on many
> platforms. The driver deals with it properly, so there's no need
> to output a warning that may potentially confuse users.
> 
> Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
> ---

Applied, thanks!

>  drivers/clocksource/timer-of.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/clocksource/timer-of.c b/drivers/clocksource/timer-of.c
> index 80542289fae7..d8c2bd4391d0 100644
> --- a/drivers/clocksource/timer-of.c
> +++ b/drivers/clocksource/timer-of.c
> @@ -113,8 +113,10 @@ static __init int timer_of_clk_init(struct device_node *np,
>  	of_clk->clk = of_clk->name ? of_clk_get_by_name(np, of_clk->name) :
>  		of_clk_get(np, of_clk->index);
>  	if (IS_ERR(of_clk->clk)) {
> -		pr_err("Failed to get clock for %pOF\n", np);
> -		return PTR_ERR(of_clk->clk);
> +		ret = PTR_ERR(of_clk->clk);
> +		if (ret != -EPROBE_DEFER)
> +			pr_err("Failed to get clock for %pOF\n", np);
> +		goto out;
>  	}
>  
>  	ret = clk_prepare_enable(of_clk->clk);
>

Patch
diff mbox series

diff --git a/drivers/clocksource/timer-of.c b/drivers/clocksource/timer-of.c
index 80542289fae7..d8c2bd4391d0 100644
--- a/drivers/clocksource/timer-of.c
+++ b/drivers/clocksource/timer-of.c
@@ -113,8 +113,10 @@  static __init int timer_of_clk_init(struct device_node *np,
 	of_clk->clk = of_clk->name ? of_clk_get_by_name(np, of_clk->name) :
 		of_clk_get(np, of_clk->index);
 	if (IS_ERR(of_clk->clk)) {
-		pr_err("Failed to get clock for %pOF\n", np);
-		return PTR_ERR(of_clk->clk);
+		ret = PTR_ERR(of_clk->clk);
+		if (ret != -EPROBE_DEFER)
+			pr_err("Failed to get clock for %pOF\n", np);
+		goto out;
 	}
 
 	ret = clk_prepare_enable(of_clk->clk);