On 02/27/2017 12:12 PM, Pavel Machek wrote: > On Fri 2017-02-24 07:41:48, Heiner Kallweit wrote: >> When registering a LED device we have the option to set a default trigger. >> Depending on load order of drivers this trigger may not be available yet. >> (affected LED device in my case: a DT-configured GPIO LED) >> So far if the default trigger can't be found this error is silently >> ignored. >> >> Let's change this to return EPROBE_DEFER if the default trigger can't be >> found. This gives the system the chance to probe the LED device later >> once the trigger is available. >> >> In addition in led_trigger_set_default break out of the loop when trigger >> has been found. > > Hmm. Problem with this is that if the we configure non-existing > trigger, or trigger not configured in current kernel, LED will > disappear and user will have "fun" debugging why, right? Right, so I propose to add suitable dev_err logging in led_classdev_register() if led_trigger_set_default() returns non-zero. -- Best regards, Jacek Anaszewski