leds: lm3550: fix attribute-creation race
authorJohan Hovold <johan@kernel.org>
Wed, 25 Jun 2014 17:08:45 +0000 (10:08 -0700)
committerBryan Wu <cooloney@gmail.com>
Wed, 25 Jun 2014 22:00:55 +0000 (15:00 -0700)
commit74c850394394efc0905c22ab9686e8d20e3921eb
tree53fdcc6e27c3ff5c459df368608cce191472030c
parentd0d480cce8f522b37c2c1de38230fc9ad15fa506
leds: lm3550: fix attribute-creation race

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

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