X-Git-Url: https://git.sur5r.net/?p=groeck-nct6775;a=blobdiff_plain;f=compat.h;h=72cea8c67cbeca0200df7f2bcd49d2fec8a01296;hp=5d37fc7cf9b11c3093314670264f84f15f94f9b6;hb=278a323282f6ec5d8ecc13ae9595b6a2d109b579;hpb=11329122351ff6f0b276b7288051bc2264ad0ea3 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__