linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] thermal-generic-adc: Silent error message for EPROBE_DEFER
@ 2019-09-10  7:59 Hsin-Yi Wang
  2019-10-07 17:07 ` Hsin-Yi Wang
  0 siblings, 1 reply; 4+ messages in thread
From: Hsin-Yi Wang @ 2019-09-10  7:59 UTC (permalink / raw)
  To: Eduardo Valentin, Laxman Dewangan, linux-arm-kernel
  Cc: Zhang Rui, Daniel Lezcano, Jonathan Cameron, linux-pm, linux-kernel

If devm_iio_channel_get() or devm_thermal_zone_of_sensor_register()
fail with EPROBE_DEFER, we shouldn't print an error message, as the
device will be probed again later.

Signed-off-by: Hsin-Yi Wang <hsinyi@chromium.org>
---
 drivers/thermal/thermal-generic-adc.c | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/thermal/thermal-generic-adc.c b/drivers/thermal/thermal-generic-adc.c
index dcecf2e8dc8e..ae5743c9a894 100644
--- a/drivers/thermal/thermal-generic-adc.c
+++ b/drivers/thermal/thermal-generic-adc.c
@@ -134,7 +134,8 @@ static int gadc_thermal_probe(struct platform_device *pdev)
 	gti->channel = devm_iio_channel_get(&pdev->dev, "sensor-channel");
 	if (IS_ERR(gti->channel)) {
 		ret = PTR_ERR(gti->channel);
-		dev_err(&pdev->dev, "IIO channel not found: %d\n", ret);
+		if (ret != -EPROBE_DEFER)
+			dev_err(&pdev->dev, "IIO channel not found: %d\n", ret);
 		return ret;
 	}
 
@@ -142,8 +143,10 @@ static int gadc_thermal_probe(struct platform_device *pdev)
 							   &gadc_thermal_ops);
 	if (IS_ERR(gti->tz_dev)) {
 		ret = PTR_ERR(gti->tz_dev);
-		dev_err(&pdev->dev, "Thermal zone sensor register failed: %d\n",
-			ret);
+		if (ret != -EPROBE_DEFER)
+			dev_err(&pdev->dev,
+				"Thermal zone sensor register failed: %d\n",
+				ret);
 		return ret;
 	}
 
-- 
2.23.0.162.g0b9fbb3734-goog


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] thermal-generic-adc: Silent error message for EPROBE_DEFER
  2019-09-10  7:59 [PATCH] thermal-generic-adc: Silent error message for EPROBE_DEFER Hsin-Yi Wang
@ 2019-10-07 17:07 ` Hsin-Yi Wang
  2019-10-08 11:45   ` Jonathan Cameron
  0 siblings, 1 reply; 4+ messages in thread
From: Hsin-Yi Wang @ 2019-10-07 17:07 UTC (permalink / raw)
  To: Eduardo Valentin, Laxman Dewangan,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE
  Cc: Zhang Rui, Daniel Lezcano, Jonathan Cameron, linux-pm, lkml

On Tue, Sep 10, 2019 at 12:59 AM Hsin-Yi Wang <hsinyi@chromium.org> wrote:
>
> If devm_iio_channel_get() or devm_thermal_zone_of_sensor_register()
> fail with EPROBE_DEFER, we shouldn't print an error message, as the
> device will be probed again later.
>
> Signed-off-by: Hsin-Yi Wang <hsinyi@chromium.org>
> ---

Ping on the thread. Any suggestion for this patch?
Thanks

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] thermal-generic-adc: Silent error message for EPROBE_DEFER
  2019-10-07 17:07 ` Hsin-Yi Wang
@ 2019-10-08 11:45   ` Jonathan Cameron
  2019-10-08 13:57     ` Daniel Lezcano
  0 siblings, 1 reply; 4+ messages in thread
From: Jonathan Cameron @ 2019-10-08 11:45 UTC (permalink / raw)
  To: Hsin-Yi Wang
  Cc: Eduardo Valentin, Laxman Dewangan,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
	Zhang Rui, Daniel Lezcano, lkml, Jonathan Cameron, linux-pm

On Mon, 7 Oct 2019 10:07:22 -0700
Hsin-Yi Wang <hsinyi@chromium.org> wrote:

> On Tue, Sep 10, 2019 at 12:59 AM Hsin-Yi Wang <hsinyi@chromium.org> wrote:
> >
> > If devm_iio_channel_get() or devm_thermal_zone_of_sensor_register()
> > fail with EPROBE_DEFER, we shouldn't print an error message, as the
> > device will be probed again later.
> >
> > Signed-off-by: Hsin-Yi Wang <hsinyi@chromium.org>
> > ---  
> 
> Ping on the thread. Any suggestion for this patch?
> Thanks

Looks sensible to me.

Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] thermal-generic-adc: Silent error message for EPROBE_DEFER
  2019-10-08 11:45   ` Jonathan Cameron
@ 2019-10-08 13:57     ` Daniel Lezcano
  0 siblings, 0 replies; 4+ messages in thread
From: Daniel Lezcano @ 2019-10-08 13:57 UTC (permalink / raw)
  To: Jonathan Cameron, Hsin-Yi Wang
  Cc: Eduardo Valentin, Laxman Dewangan,
	moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
	Zhang Rui, lkml, Jonathan Cameron, linux-pm

On 08/10/2019 13:45, Jonathan Cameron wrote:
> On Mon, 7 Oct 2019 10:07:22 -0700
> Hsin-Yi Wang <hsinyi@chromium.org> wrote:
> 
>> On Tue, Sep 10, 2019 at 12:59 AM Hsin-Yi Wang <hsinyi@chromium.org> wrote:
>>>
>>> If devm_iio_channel_get() or devm_thermal_zone_of_sensor_register()
>>> fail with EPROBE_DEFER, we shouldn't print an error message, as the
>>> device will be probed again later.
>>>
>>> Signed-off-by: Hsin-Yi Wang <hsinyi@chromium.org>
>>> ---  
>>
>> Ping on the thread. Any suggestion for this patch?
>> Thanks
> 
> Looks sensible to me.
> 
> Acked-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

I've applied this patch on the testing branch.

Thanks!

-- 
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-10-08 13:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-10  7:59 [PATCH] thermal-generic-adc: Silent error message for EPROBE_DEFER Hsin-Yi Wang
2019-10-07 17:07 ` Hsin-Yi Wang
2019-10-08 11:45   ` Jonathan Cameron
2019-10-08 13:57     ` Daniel Lezcano

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).