]> git.sur5r.net Git - groeck-nct6775/commitdiff
compat.h: Make kstrtol definition conditional
authorGuenter Roeck <linux@roeck-us.net>
Thu, 11 Dec 2014 17:03:19 +0000 (09:03 -0800)
committerGuenter Roeck <linux@roeck-us.net>
Thu, 11 Dec 2014 17:03:19 +0000 (09:03 -0800)
strict_strtol and strict_strtoul are no longer defined in the latest kernel,
so don't use those functions unless really needed.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
compat.h

index 458caf4e61a9b9ea7a9afa235a4f4fd7d11dfed1..b670e5ce78bc400af3f8331ed6883b6f3c1238f4 100644 (file)
--- a/compat.h
+++ b/compat.h
@@ -199,12 +199,14 @@ module_exit(__driver##_exit);
 #define clamp_val SENSORS_LIMIT
 #endif
 
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 12, 0)
 #ifndef kstrtol
 #define kstrtol strict_strtol
 #endif
 #ifndef kstrtoul
 #define kstrtoul strict_strtoul
 #endif
+#endif
 
 #ifndef request_muxed_region
 #define request_muxed_region(a, b, c) (true)