greybus: light: fix incorrect led attribute files allocation
authorDavid Lin <dtwlin@google.com>
Mon, 22 Aug 2016 22:51:11 +0000 (15:51 -0700)
committerGreg Kroah-Hartman <gregkh@google.com>
Fri, 26 Aug 2016 11:16:11 +0000 (13:16 +0200)
commit0e352343c2e371ad618d8850f542e9ca230e3aa6
tree37856ec34f57f6299b1637febcb3d99fb4c65b6a
parentf0ec8cd5eb49e0360ce6ba865d5f2267b28d1f84
greybus: light: fix incorrect led attribute files allocation

Fix incorrect attribute size when the channel supports fader, as well as
fixing the issue that the attribute list is not null terminated.

Testing Done:
 - Verified by setting brightness and color on red/green/blue leds
   of the device class test board.

Signed-off-by: David Lin <dtwlin@google.com>
Reviewed-by: Rui Miguel Silva <rui.silva@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/light.c