From f20b4ad763b1f2fc6ac1104d52affa0b6e79eb17 Mon Sep 17 00:00:00 2001 From: Guenter Roeck Date: Sun, 12 Jan 2014 11:00:23 -0800 Subject: [PATCH] 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 --- compat.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) 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) -- 2.39.2