From: Guenter Roeck Date: Thu, 11 Dec 2014 17:03:19 +0000 (-0800) Subject: compat.h: Make kstrtol definition conditional X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=8f3e248838fca3270dcdd23cffa9a00e7fb329b3;p=groeck-nct6775 compat.h: Make kstrtol definition conditional 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 --- diff --git a/compat.h b/compat.h index 458caf4..b670e5c 100644 --- 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)