Skip to content
Commit 14b5d6dd authored by Florian Fainelli's avatar Florian Fainelli Committed by Richard Purdie
Browse files

leds: Fix race between LED device uevent and actual attributes creation



If we were to dynamically register/unregister leds and have udev or other
daemons handle the leds class uevents, we would be notified of the adding of a
new LED and if the daemon immediately tries to open one of the attributes of
the led device, it would fail with a "no such file or directory" error since
this the attributes are not yet created. Fix this by switching attributes to be
class-wide, such that the driver core will register these attributes with
device_add_attrs and then emit the kobject_uevent ADD signal.

Signed-off-by: default avatarFainelli <ffainelli@freebox.fr>
Signed-off-by: default avatarRichard Purdie <rpurdie@linux.intel.com>
parent 0493a4ff
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment