diff options
author | Sandeep Patil <sspatil@google.com> | 2016-03-15 12:28:38 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@google.com> | 2016-03-16 21:49:31 -0700 |
commit | f8811c7630912617d1bc0e0b18e3221fec26f9cf (patch) | |
tree | bbdcdd2172110a649b7d1d4abb7746ec9720a3cf /drivers/staging/greybus/kernel_ver.h | |
parent | 3b90040de82a43ee0538d36b32c9fa4cbbab59c6 (diff) |
greybus: power_supply: reverse version check for new psy API
Reversing the kernel version check for new power supply APIs will
easily allow us to use older kernels with backported power supply APIs
by defining "CORE_OWNS_PSY_STRUCT" in power supply core header
Testing Done:
- Build tested with arche kernel with backported power supply APIs
- Build tested also with current arche kernel to make sure we build with
3.10 kernels
Signed-off-by: Sandeep Patil <sspatil@google.com>
Reviewed-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 | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/greybus/kernel_ver.h b/drivers/staging/greybus/kernel_ver.h index 18bf8dff0f86..f5e62ed3d9f5 100644 --- a/drivers/staging/greybus/kernel_ver.h +++ b/drivers/staging/greybus/kernel_ver.h @@ -17,9 +17,9 @@ #include <linux/kernel.h> #include <linux/version.h> -#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 1, 0) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 1, 0) /* Commit: 297d716 power_supply: Change ownership from driver to core */ -#define DRIVER_OWNS_PSY_STRUCT +#define CORE_OWNS_PSY_STRUCT #endif #ifndef __ATTR_WO |