aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pwm
diff options
context:
space:
mode:
authorStefan Wahren <wahrenst@gmx.net>2019-08-24 16:09:48 +0200
committerThierry Reding <thierry.reding@gmail.com>2019-09-21 01:24:11 +0200
commit9e3ca01f7e58ef4662c18adcb766ee3422ace0fb (patch)
treec58be27cd702dc7f6a951f27c98fae45553e5324 /drivers/pwm
parentpwm: bcm2835: Fix period_ns range check (diff)
downloadlinux-dev-9e3ca01f7e58ef4662c18adcb766ee3422ace0fb.tar.xz
linux-dev-9e3ca01f7e58ef4662c18adcb766ee3422ace0fb.zip
pwm: bcm2835: Suppress error message during deferred probe
This suppresses error messages in case the PWM clock isn't ready yet. Signed-off-by: Stefan Wahren <wahrenst@gmx.net> Reviewed-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Diffstat (limited to 'drivers/pwm')
-rw-r--r--drivers/pwm/pwm-bcm2835.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/pwm/pwm-bcm2835.c b/drivers/pwm/pwm-bcm2835.c
index 2c82386c0ebf..91e24f01b54e 100644
--- a/drivers/pwm/pwm-bcm2835.c
+++ b/drivers/pwm/pwm-bcm2835.c
@@ -153,8 +153,11 @@ static int bcm2835_pwm_probe(struct platform_device *pdev)
pc->clk = devm_clk_get(&pdev->dev, NULL);
if (IS_ERR(pc->clk)) {
- dev_err(&pdev->dev, "clock not found: %ld\n", PTR_ERR(pc->clk));
- return PTR_ERR(pc->clk);
+ ret = PTR_ERR(pc->clk);
+ if (ret != -EPROBE_DEFER)
+ dev_err(&pdev->dev, "clock not found: %d\n", ret);
+
+ return ret;
}
ret = clk_prepare_enable(pc->clk);