From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: Thierry Reding <thierry.reding@gmail.com>
Cc: linux-pwm@vger.kernel.org, kernel@pengutronix.de
Subject: [PATCH 3/4] pwm: imx: don't print an error on -EPROBE_DEFER
Date: Mon, 7 Jan 2019 20:53:51 +0100 [thread overview]
Message-ID: <20190107195352.3149-4-u.kleine-koenig@pengutronix.de> (raw)
In-Reply-To: <20190107195352.3149-1-u.kleine-koenig@pengutronix.de>
When getting the peripheral clock fails with -EPROBE_DEFER the driver is
usually probed again later and emitting an error message is more irritating
than helpful.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
drivers/pwm/pwm-imx.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/pwm/pwm-imx.c b/drivers/pwm/pwm-imx.c
index 809493d86d22..10ac039e7ddb 100644
--- a/drivers/pwm/pwm-imx.c
+++ b/drivers/pwm/pwm-imx.c
@@ -411,9 +411,12 @@ static int imx_pwm_probe(struct platform_device *pdev)
imx->clk_per = devm_clk_get(&pdev->dev, "per");
if (IS_ERR(imx->clk_per)) {
- dev_err(&pdev->dev, "getting per clock failed with %ld\n",
- PTR_ERR(imx->clk_per));
- return PTR_ERR(imx->clk_per);
+ int ret = PTR_ERR(imx->clk_per);
+
+ if (ret != -EPROBE_DEFER)
+ dev_err(&pdev->dev, "getting per clock failed (%d)\n",
+ ret);
+ return ret;
}
imx->chip.ops = data->ops;
--
2.20.1
next prev parent reply other threads:[~2019-01-07 19:53 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-07 19:53 [PATCH 0/4] pwm: imx: some cleanup patches Uwe Kleine-König
2019-01-07 19:53 ` [PATCH 1/4] pwm: imx: remove if block where the condition is always wrong Uwe Kleine-König
2019-01-07 19:53 ` [PATCH 2/4] pwm: imx: set drvdata earlier simplifying the end of .probe Uwe Kleine-König
2019-01-07 19:53 ` Uwe Kleine-König [this message]
2019-01-07 19:53 ` [PATCH 4/4] pwm: imx: split into two drivers Uwe Kleine-König
2019-01-10 20:19 ` [PATCH 0/2] ARM: adapt defconfigs to pwm driver split Uwe Kleine-König
2019-01-10 20:19 ` [PATCH 1/2] ARM: imx_v6_v7_defconfig: continue compiling the pwm driver Uwe Kleine-König
2019-01-10 20:19 ` [PATCH 2/2] ARM: imx_v4_v5_defconfig: enable PWM driver Uwe Kleine-König
2019-03-22 1:57 ` [PATCH 0/2] ARM: adapt defconfigs to pwm driver split Shawn Guo
2019-01-10 10:07 ` [PATCH 0/4] pwm: imx: some cleanup patches Thierry Reding
-- strict thread matches above, loose matches on Subject: below --
2018-11-19 19:58 [PATCH 1/4] pwm: imx: remove if block where the condition is always wrong Uwe Kleine-König
2018-11-19 19:58 ` [PATCH 3/4] pwm: imx: don't print an error on -EPROBE_DEFER Uwe Kleine-König
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190107195352.3149-4-u.kleine-koenig@pengutronix.de \
--to=u.kleine-koenig@pengutronix.de \
--cc=kernel@pengutronix.de \
--cc=linux-pwm@vger.kernel.org \
--cc=thierry.reding@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).