* [PATCH] leds: tlc591xxt: hide error on EPROBE_DEFER
@ 2020-04-17 11:37 Tomi Valkeinen
2020-04-17 12:55 ` Dan Murphy
0 siblings, 1 reply; 3+ messages in thread
From: Tomi Valkeinen @ 2020-04-17 11:37 UTC (permalink / raw)
To: Jacek Anaszewski, Pavel Machek, Dan Murphy, linux-leds; +Cc: Tomi Valkeinen
If devm_led_classdev_register_ext() fails with EPROBE_DEFER, we get:
tlc591xx 0-0040: couldn't register LED (null)
Only print the error if the error is something else than EPROBE_DEFER.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
---
drivers/leds/leds-tlc591xx.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/leds/leds-tlc591xx.c b/drivers/leds/leds-tlc591xx.c
index a8911ebd30e5..0929f1275814 100644
--- a/drivers/leds/leds-tlc591xx.c
+++ b/drivers/leds/leds-tlc591xx.c
@@ -214,8 +214,9 @@ tlc591xx_probe(struct i2c_client *client,
err = devm_led_classdev_register_ext(dev, &led->ldev,
&init_data);
if (err < 0) {
- dev_err(dev, "couldn't register LED %s\n",
- led->ldev.name);
+ if (err != -EPROBE_DEFER)
+ dev_err(dev, "couldn't register LED %s\n",
+ led->ldev.name);
return err;
}
}
--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] leds: tlc591xxt: hide error on EPROBE_DEFER
2020-04-17 11:37 [PATCH] leds: tlc591xxt: hide error on EPROBE_DEFER Tomi Valkeinen
@ 2020-04-17 12:55 ` Dan Murphy
2020-04-17 13:39 ` Pavel Machek
0 siblings, 1 reply; 3+ messages in thread
From: Dan Murphy @ 2020-04-17 12:55 UTC (permalink / raw)
To: Tomi Valkeinen, Jacek Anaszewski, Pavel Machek, linux-leds
Tomi
On 4/17/20 6:37 AM, Tomi Valkeinen wrote:
> If devm_led_classdev_register_ext() fails with EPROBE_DEFER, we get:
>
> tlc591xx 0-0040: couldn't register LED (null)
>
> Only print the error if the error is something else than EPROBE_DEFER.
>
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
> ---
> drivers/leds/leds-tlc591xx.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/leds/leds-tlc591xx.c b/drivers/leds/leds-tlc591xx.c
> index a8911ebd30e5..0929f1275814 100644
> --- a/drivers/leds/leds-tlc591xx.c
> +++ b/drivers/leds/leds-tlc591xx.c
> @@ -214,8 +214,9 @@ tlc591xx_probe(struct i2c_client *client,
> err = devm_led_classdev_register_ext(dev, &led->ldev,
> &init_data);
> if (err < 0) {
> - dev_err(dev, "couldn't register LED %s\n",
> - led->ldev.name);
> + if (err != -EPROBE_DEFER)
> + dev_err(dev, "couldn't register LED %s\n",
> + led->ldev.name);
> return err;
> }
> }
Reviewed-by: Dan Murphy <dmurphy@ti.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] leds: tlc591xxt: hide error on EPROBE_DEFER
2020-04-17 12:55 ` Dan Murphy
@ 2020-04-17 13:39 ` Pavel Machek
0 siblings, 0 replies; 3+ messages in thread
From: Pavel Machek @ 2020-04-17 13:39 UTC (permalink / raw)
To: Dan Murphy; +Cc: Tomi Valkeinen, Jacek Anaszewski, linux-leds
[-- Attachment #1: Type: text/plain, Size: 605 bytes --]
On Fri 2020-04-17 07:55:25, Dan Murphy wrote:
> Tomi
>
> On 4/17/20 6:37 AM, Tomi Valkeinen wrote:
> > If devm_led_classdev_register_ext() fails with EPROBE_DEFER, we get:
> >
> > tlc591xx 0-0040: couldn't register LED (null)
> >
> > Only print the error if the error is something else than EPROBE_DEFER.
> >
> > Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
> Reviewed-by: Dan Murphy <dmurphy@ti.com>
Thanks, applied.
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-04-17 13:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-17 11:37 [PATCH] leds: tlc591xxt: hide error on EPROBE_DEFER Tomi Valkeinen
2020-04-17 12:55 ` Dan Murphy
2020-04-17 13:39 ` Pavel Machek
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.