]> git.baikalelectronics.ru Git - kernel.git/commit
leds: lm355x: fix attribute-creation race
authorJohan Hovold <johan@kernel.org>
Wed, 25 Jun 2014 17:08:47 +0000 (10:08 -0700)
committerBryan Wu <cooloney@gmail.com>
Wed, 25 Jun 2014 22:10:54 +0000 (15:10 -0700)
commitf9184cb93045ada7001e9eead1a2103401a75500
tree7ff26332ab553647fa143ea55cf40bf98a716d37
parent7a65397a133fdf0685b84a60e1dd015621cc70cb
leds: lm355x: fix attribute-creation race

Use the attribute groups of the led-class to create the indicator-LED
attributes during probe in order to avoid racing with userspace.

Note that the comment about the pattern attribute only being for LM3554
was incorrect and did not match the code (the original leds-lm3556
driver had the attribute before LM3554 support was added).

Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Bryan Wu <cooloney@gmail.com>
drivers/leds/leds-lm355x.c