#include <linux/version.h>
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 16)
-#error This driver is for kernel versions 2.6.16 and later
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 32)
+#error This driver is for kernel versions 2.6.32 and later
#endif
#if !defined (CONFIG_HWMON_VID) && !defined(CONFIG_HWMON_VID_MODULE)
#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)
{
}
return error;
}
+#endif
static void sysfs_remove_groups(struct kobject *kobj,
const struct attribute_group **groups)
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)
{
if (IS_ERR(ptr))
else
return 0;
}
-
+#endif
+#endif
#endif
#ifdef __NEED_I2C__