leds: flash: Fix the size of sysfs_groups array
authorJacek Anaszewski <j.anaszewski@samsung.com>
Thu, 12 Mar 2015 15:45:02 +0000 (08:45 -0700)
committerBryan Wu <cooloney@gmail.com>
Mon, 30 Mar 2015 18:55:48 +0000 (11:55 -0700)
commit9647507aff4d885d98a884a634d360b8f2d24c10
tree49f854c5ffb53e8bebeabc46b8cc10a199440206
parentf6ad395bad57dcd15c6423715d15d91363a62ae8
leds: flash: Fix the size of sysfs_groups array

LED_FLASH_MAX_SYSFS_GROUPS macro had value that was relevant for
previous version of the patches introducing LED Flash class. Currently
it is required to reserve the room for maximum 4 sysfs groups.
Since the last element of the struct attribute_group array passed to
the function device_create_with_groups has to be NULL, the size of the
array has to be greater by one than maximum allowed number of groups.
Therefore, the name of the macro is being changed to
LED_FLASH_SYSFS_GROUPS_SIZE, to make it more accurrate.

Signed-off-by: Jacek Anaszewski <j.anaszewski@samsung.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Bryan Wu <cooloney@gmail.com>
Cc: Richard Purdie <rpurdie@rpsys.net>
Signed-off-by: Bryan Wu <cooloney@gmail.com>
include/linux/led-class-flash.h