[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20221104172243.1004384-1-nate.d@variscite.com>
Date: Fri, 4 Nov 2022 12:22:43 -0500
From: Nate Drude <nate.d@...iscite.com>
To: Andreas Klinger <ak@...klinger.de>,
Jonathan Cameron <jic23@...nel.org>,
Lars-Peter Clausen <lars@...afoo.de>,
linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: eran.m@...iscite.com, Nate Drude <nate.d@...iscite.com>
Subject: [PATCH] iio: adc: hx711: remove errors during deferred probe
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@...iscite.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
Powered by blists - more mailing lists