diff options
author | Tero Kristo <t-kristo@ti.com> | 2016-11-24 13:58:28 +0100 |
---|---|---|
committer | Guenter Roeck <linux@roeck-us.net> | 2016-12-16 15:53:53 +0100 |
commit | 9b3865749589d67f612d71b447847223b2321408 (patch) | |
tree | 708fc46c53328d290879cbec69ee9703176d7c05 | |
parent | watchdog: meson: Remove unneeded platform MODULE_ALIAS (diff) | |
download | linux-9b3865749589d67f612d71b447847223b2321408.tar.xz linux-9b3865749589d67f612d71b447847223b2321408.zip |
watchdog: davinci: add support for deferred probing
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>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
-rw-r--r-- | drivers/watchdog/davinci_wdt.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/watchdog/davinci_wdt.c b/drivers/watchdog/davinci_wdt.c index 17454ca653f4..0e731d797a2a 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); |