diff options
author | Rui Miguel Silva <rui.silva@linaro.org> | 2016-01-12 14:35:48 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@google.com> | 2016-01-13 15:26:49 -0800 |
commit | b827e1137ca9b495f10f3215ed6dd6ff738f0c81 (patch) | |
tree | 5444d3dfcaa7acd8647f4d863ad8f22f26fffdca /drivers/staging/greybus/kernel_ver.h | |
parent | de141314498b3e52cec7a0e5100e4dd278bde4c7 (diff) |
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: Rui Miguel Silva <rui.silva@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/kernel_ver.h')
-rw-r--r-- | drivers/staging/greybus/kernel_ver.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/staging/greybus/kernel_ver.h b/drivers/staging/greybus/kernel_ver.h index d9bf159329e5..1f8d6a1bb6da 100644 --- a/drivers/staging/greybus/kernel_ver.h +++ b/drivers/staging/greybus/kernel_ver.h @@ -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 |