A backport (commit
79c4de08c0e5a26b04a4ac9e6543dad6379f0b40) was
applied in kernel which adding attribute-group support in led-class.
Remove the LED_HAVE_GROUPS flag check entirely that allow led
drivers to create custom attributes like color/fade_in/fade_out.
Testing Done: Compiled and verified on EVT2 and gpbridge-test module
with device class daughter board.
Signed-off-by: Kris Huang <huang_kris@projectara.com>
Reviewed-by: Rui Miguel Silva <rui.silva@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
list_entry((ptr)->prev, type, member)
#endif
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 17, 0)
-/*
- * Before this version the led classdev did not support groups
- */
-#define LED_HAVE_GROUPS
-#endif
-
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 19, 0)
/*
* At this time the internal API for the set brightness was changed to the async
}
#endif /* !LED_HAVE_FLASH */
-#ifdef LED_HAVE_GROUPS
static int gb_lights_color_set(struct gb_channel *channel, u32 color);
static int gb_lights_fade_set(struct gb_channel *channel);
return ret;
}
-#else /* LED_HAVE_GROUPS */
-static int channel_attr_groups_set(struct gb_channel *channel,
- struct led_classdev *cdev)
-{
- return 0;
-}
-#endif /* !LED_HAVE_GROUPS */
static int __gb_lights_led_brightness_set(struct gb_channel *channel)
{