]> git.sur5r.net Git - groeck-it87/commitdiff
Provide vid_from_reg and vid_which_vrm if needed
authorGuenter Roeck <linux@roeck-us.net>
Tue, 8 May 2018 21:25:20 +0000 (14:25 -0700)
committerGuenter Roeck <linux@roeck-us.net>
Tue, 8 May 2018 21:26:55 +0000 (14:26 -0700)
Some oddball distributions do not have CONFIG_HWMON_VID enabled.
Work around the problem by providing dummy functions if this is the case.

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

index 865dcc520caec6b6b858363d8f621eb84231afcc..c8ac0dee54178ef22743bd8bca98ff1b9ededa7c 100644 (file)
--- a/compat.h
+++ b/compat.h
 
 #include <linux/version.h>
 
+#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
+
 #ifndef clamp_val
 #define clamp_val SENSORS_LIMIT
 #endif