From: Nate Drude <nate.d@variscite.com>
To: Andreas Klinger <ak@it-klinger.de>,
Jonathan Cameron <jic23@kernel.org>,
Lars-Peter Clausen <lars@metafoo.de>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: eran.m@variscite.com, Nate Drude <nate.d@variscite.com>
Subject: [PATCH] iio: adc: hx711: remove errors during deferred probe
Date: Fri, 4 Nov 2022 12:22:43 -0500 [thread overview]
Message-ID: <20221104172243.1004384-1-nate.d@variscite.com> (raw)
This patch removes noisy kernel messages like "failed to sck-gpiod" or
"failed to get dout-gpiod" when the probe is deferred.
Signed-off-by: Nate Drude <nate.d@variscite.com>
---
drivers/iio/adc/hx711.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/drivers/iio/adc/hx711.c b/drivers/iio/adc/hx711.c
index f7ee856a6b8b..8ba4a5b113aa 100644
--- a/drivers/iio/adc/hx711.c
+++ b/drivers/iio/adc/hx711.c
@@ -482,8 +482,9 @@ static int hx711_probe(struct platform_device *pdev)
*/
hx711_data->gpiod_pd_sck = devm_gpiod_get(dev, "sck", GPIOD_OUT_LOW);
if (IS_ERR(hx711_data->gpiod_pd_sck)) {
- dev_err(dev, "failed to get sck-gpiod: err=%ld\n",
- PTR_ERR(hx711_data->gpiod_pd_sck));
+ if (PTR_ERR(hx711_data->gpiod_pd_sck) != -EPROBE_DEFER)
+ dev_err(dev, "failed to get sck-gpiod: err=%ld\n",
+ PTR_ERR(hx711_data->gpiod_pd_sck));
return PTR_ERR(hx711_data->gpiod_pd_sck);
}
@@ -493,8 +494,9 @@ static int hx711_probe(struct platform_device *pdev)
*/
hx711_data->gpiod_dout = devm_gpiod_get(dev, "dout", GPIOD_IN);
if (IS_ERR(hx711_data->gpiod_dout)) {
- dev_err(dev, "failed to get dout-gpiod: err=%ld\n",
- PTR_ERR(hx711_data->gpiod_dout));
+ if (PTR_ERR(hx711_data->gpiod_dout) != -EPROBE_DEFER)
+ dev_err(dev, "failed to get dout-gpiod: err=%ld\n",
+ PTR_ERR(hx711_data->gpiod_dout));
return PTR_ERR(hx711_data->gpiod_dout);
}
--
2.38.1
next reply other threads:[~2022-11-04 17:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-04 17:22 Nate Drude [this message]
2022-11-04 19:10 ` Christophe JAILLET
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=20221104172243.1004384-1-nate.d@variscite.com \
--to=nate.d@variscite.com \
--cc=ak@it-klinger.de \
--cc=eran.m@variscite.com \
--cc=jic23@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®