* [PATCH] watchdog: davinci: add support for deferred probing
@ 2016-11-24 12:58 Tero Kristo
2016-11-24 15:38 ` Guenter Roeck
0 siblings, 1 reply; 2+ messages in thread
From: Tero Kristo @ 2016-11-24 12:58 UTC (permalink / raw)
To: wim; +Cc: linux, linux-watchdog
devm_clk_get can fail with EPROBE_DEFER in case the clock provider is
not ready yet. Handle this case gracefully, rather than dumping out
a huge warning.
Signed-off-by: Tero Kristo <t-kristo@ti.com>
---
drivers/watchdog/davinci_wdt.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/watchdog/davinci_wdt.c b/drivers/watchdog/davinci_wdt.c
index 17454ca..0e731d7 100644
--- a/drivers/watchdog/davinci_wdt.c
+++ b/drivers/watchdog/davinci_wdt.c
@@ -166,8 +166,12 @@ static int davinci_wdt_probe(struct platform_device *pdev)
return -ENOMEM;
davinci_wdt->clk = devm_clk_get(dev, NULL);
- if (WARN_ON(IS_ERR(davinci_wdt->clk)))
+
+ if (IS_ERR(davinci_wdt->clk)) {
+ if (PTR_ERR(davinci_wdt->clk) != -EPROBE_DEFER)
+ dev_err(&pdev->dev, "failed to get clock node\n");
return PTR_ERR(davinci_wdt->clk);
+ }
clk_prepare_enable(davinci_wdt->clk);
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] watchdog: davinci: add support for deferred probing
2016-11-24 12:58 [PATCH] watchdog: davinci: add support for deferred probing Tero Kristo
@ 2016-11-24 15:38 ` Guenter Roeck
0 siblings, 0 replies; 2+ messages in thread
From: Guenter Roeck @ 2016-11-24 15:38 UTC (permalink / raw)
To: Tero Kristo, wim; +Cc: linux-watchdog
On 11/24/2016 04:58 AM, Tero Kristo wrote:
> devm_clk_get can fail with EPROBE_DEFER in case the clock provider is
> not ready yet. Handle this case gracefully, rather than dumping out
> a huge warning.
>
> Signed-off-by: Tero Kristo <t-kristo@ti.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
> ---
> drivers/watchdog/davinci_wdt.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/watchdog/davinci_wdt.c b/drivers/watchdog/davinci_wdt.c
> index 17454ca..0e731d7 100644
> --- a/drivers/watchdog/davinci_wdt.c
> +++ b/drivers/watchdog/davinci_wdt.c
> @@ -166,8 +166,12 @@ static int davinci_wdt_probe(struct platform_device *pdev)
> return -ENOMEM;
>
> davinci_wdt->clk = devm_clk_get(dev, NULL);
> - if (WARN_ON(IS_ERR(davinci_wdt->clk)))
> +
> + if (IS_ERR(davinci_wdt->clk)) {
> + if (PTR_ERR(davinci_wdt->clk) != -EPROBE_DEFER)
> + dev_err(&pdev->dev, "failed to get clock node\n");
> return PTR_ERR(davinci_wdt->clk);
> + }
>
> clk_prepare_enable(davinci_wdt->clk);
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-11-24 15:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-24 12:58 [PATCH] watchdog: davinci: add support for deferred probing Tero Kristo
2016-11-24 15:38 ` Guenter Roeck
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.