From a7af2fe6d1baa45e73531fb994444fa0f59d8f62 Mon Sep 17 00:00:00 2001 From: Rui Miguel Silva Date: Thu, 8 Sep 2016 17:17:48 +0100 Subject: staging: greybus: light: remove KERNEL_VERSION checks No need to support older kernel versions in the Greybus Light driver, so remove the checks as needed, we can now rely on all of the correct LED core apis being present. And compile only if flash and v4l2 flash is reachable. Signed-off-by: Rui Miguel Silva Signed-off-by: Greg Kroah-Hartman --- drivers/staging/greybus/kernel_ver.h | 30 ------------------------------ 1 file changed, 30 deletions(-) (limited to 'drivers/staging/greybus/kernel_ver.h') diff --git a/drivers/staging/greybus/kernel_ver.h b/drivers/staging/greybus/kernel_ver.h index 59d55be..980263f 100644 --- a/drivers/staging/greybus/kernel_ver.h +++ b/drivers/staging/greybus/kernel_ver.h @@ -35,36 +35,6 @@ #define MMC_POWER_UNDEFINED_SUPPORTED #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 - * version, and one sync API was added to handle cases that need immediate - * effect. Also, the led class flash and lock for sysfs access was introduced. - */ -#define LED_HAVE_SET_SYNC -#define LED_HAVE_FLASH -#define LED_HAVE_LOCK -#include -#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(4, 2, 0) -/* - * New helper functions for registering/unregistering flash led devices as v4l2 - * subdevices were added. - */ -#define V4L2_HAVE_FLASH -#include -#endif - #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 1, 0) /* * Power supply get by name need to drop reference after call -- cgit v1.1