From: Florian Fainelli Date: Wed, 10 Mar 2010 17:32:18 +0000 (+0100) Subject: leds: Fix race between LED device uevent and actual attributes creation X-Git-Tag: v2.6.34-rc2~26^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=14b5d6dd40b3091cb5f566568baa4a74dc619286;p=pandora-kernel.git 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: Fainelli Signed-off-by: Richard Purdie --- Reading git-diff-tree failed