From: Guenter Roeck Date: Sun, 12 Jan 2014 19:00:23 +0000 (-0800) Subject: Declare vid_from_reg and vid_which_vrm locally if HWMON_VID is not enabled X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=f20b4ad763b1f2fc6ac1104d52affa0b6e79eb17;p=groeck-nct6775 Declare vid_from_reg and vid_which_vrm locally if HWMON_VID is not enabled This prevents compilation errors if HWMON_VID is not enabled in the system configuration. Signed-off-by: Guenter Roeck --- diff --git a/compat.h b/compat.h index 0a46c0d..50456b1 100644 --- a/compat.h +++ b/compat.h @@ -7,6 +7,18 @@ #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)