]> 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)
commita37fe6c4a55d546427a117b2fd4f8cb8878ea12c
tree7ff26332ab553647fa143ea55cf40bf98a716d37
parent44070ff00338580b71d3ee388bfeab8d00b7a3b5
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