]> git.sur5r.net Git - groeck-nct6775/commitdiff
Declare vid_from_reg and vid_which_vrm locally if HWMON_VID is not enabled
authorGuenter Roeck <linux@roeck-us.net>
Sun, 12 Jan 2014 19:00:23 +0000 (11:00 -0800)
committerGuenter Roeck <linux@roeck-us.net>
Sun, 12 Jan 2014 19:00:23 +0000 (11:00 -0800)
This prevents compilation errors if HWMON_VID is not enabled in the system
configuration.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
compat.h

index 0a46c0d8d998807c020be5e626dca72497b3c908..50456b12745ab1bca0bd349e50f73007611cb62f 100644 (file)
--- a/compat.h
+++ b/compat.h
@@ -7,6 +7,18 @@
 #error This driver is for kernel versions 2.6.16 and later
 #endif
 
 #error This driver is for kernel versions 2.6.16 and later
 #endif
 
+#if !defined (CONFIG_HWMON_VID) && !defined(CONFIG_HWMON_VID_MODULE)
+int vid_from_reg(int val, u8 vrm)
+{
+       return 0;
+}
+
+u8 vid_which_vrm(void)
+{
+       return 0;
+}
+#endif
+
 #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 12, 0)
 static int sysfs_create_groups(struct kobject *kobj,
                               const struct attribute_group **groups)
 #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 12, 0)
 static int sysfs_create_groups(struct kobject *kobj,
                               const struct attribute_group **groups)