leds: max8997: fix attribute-creation race
authorJohan Hovold <johan@kernel.org>
Wed, 25 Jun 2014 17:08:49 +0000 (10:08 -0700)
committerBryan Wu <cooloney@gmail.com>
Wed, 25 Jun 2014 22:24:03 +0000 (15:24 -0700)
commit35c164998eede9e3d49f51541fcf2e639670fe72
treeae03d1ebc5c9f557f6f30411d8dc55d9fdf4e9ac
parentfe29a3b0bb375aeac1c995904369553e62d03d75
leds: max8997: 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-max8997.c