From: Philip J Perry Date: Sun, 9 Aug 2015 09:55:40 +0000 (+0100) Subject: nct6775: fix compile errors on RHEL6.7 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=refs%2Fpull%2F32%2Fhead;p=groeck-nct6775 nct6775: fix compile errors on RHEL6.7 Signed-off-by: Philip J Perry --- diff --git a/compat.h b/compat.h index 5d37fc7..72cea8c 100644 --- a/compat.h +++ b/compat.h @@ -20,6 +20,7 @@ u8 vid_which_vrm(void) #endif #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 12, 0) +#if !(defined RHEL_MAJOR && RHEL_MAJOR == 6 && RHEL_MINOR >= 7) static int sysfs_create_groups(struct kobject *kobj, const struct attribute_group **groups) { @@ -39,6 +40,7 @@ static int sysfs_create_groups(struct kobject *kobj, } return error; } +#endif static void sysfs_remove_groups(struct kobject *kobj, const struct attribute_group **groups) @@ -51,6 +53,7 @@ static void sysfs_remove_groups(struct kobject *kobj, sysfs_remove_group(kobj, groups[i]); } +#if !(defined RHEL_MAJOR && RHEL_MAJOR == 6 && RHEL_MINOR >= 7) static inline int __must_check PTR_ERR_OR_ZERO(__force const void *ptr) { if (IS_ERR(ptr)) @@ -58,7 +61,7 @@ static inline int __must_check PTR_ERR_OR_ZERO(__force const void *ptr) else return 0; } - +#endif #endif #ifdef __NEED_I2C__