From: Guenter Roeck Date: Tue, 15 Dec 2015 16:19:05 +0000 (-0800) Subject: Merge pull request #36 from airbjorn/master X-Git-Url: https://git.sur5r.net/?p=groeck-nct6775;a=commitdiff_plain;h=c90fb57fb31e9691f5b10ba4bc93ee5b2380ad78;hp=dd51073fcbb35911363fcd3a08dbd716014d0c1e Merge pull request #36 from airbjorn/master nct6775: fix compile errors on RHEL7 --- diff --git a/compat.h b/compat.h index 72cea8c..691d730 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 == 7) #if !(defined RHEL_MAJOR && RHEL_MAJOR == 6 && RHEL_MINOR >= 7) static int sysfs_create_groups(struct kobject *kobj, const struct attribute_group **groups) @@ -52,7 +53,9 @@ static void sysfs_remove_groups(struct kobject *kobj, for (i = 0; groups[i]; i++) sysfs_remove_group(kobj, groups[i]); } +#endif +#if !(defined RHEL_MAJOR && RHEL_MAJOR == 7) #if !(defined RHEL_MAJOR && RHEL_MAJOR == 6 && RHEL_MINOR >= 7) static inline int __must_check PTR_ERR_OR_ZERO(__force const void *ptr) { @@ -63,6 +66,7 @@ static inline int __must_check PTR_ERR_OR_ZERO(__force const void *ptr) } #endif #endif +#endif #ifdef __NEED_I2C__