Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b827e113 authored by Rui Miguel Silva's avatar Rui Miguel Silva Committed by Greg Kroah-Hartman
Browse files

greybus: kernel_ver: add handle for lights in 4.5



In v4.5 the LED API is changed related to the set brightness
operations, set_sync is removed and the workqueue handling is now done
by leds core, so no need for individual drivers to have one.
This will be done by removing the SET_SYNC macro and add a new
SET_BLOCKING.

Signed-off-by: default avatarRui Miguel Silva <rui.silva@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent de141314
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -267,6 +267,15 @@ static inline size_t sg_pcopy_from_buffer(struct scatterlist *sgl,
#include <linux/led-class-flash.h>
#endif

#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 0)
/*
 * New change in LED api, the set_sync operation was renamed to set_blocking and
 * the workqueue is now handle by core. So, only one set operation is need.
 */
#undef LED_HAVE_SET_SYNC
#define LED_HAVE_SET_BLOCKING
#endif

#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 18, 0)
/*
 * From this version upper it was introduced the possibility to disable led