X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=compat.h;h=865dcc520caec6b6b858363d8f621eb84231afcc;hb=109b7e0ba78028138353781a63775f40ce7c111f;hp=bb256e8630cbbffad35ca20e09f8308ee0c5e970;hpb=91230349d305f5073d2a68b24878b3f040128808;p=groeck-it87 diff --git a/compat.h b/compat.h index bb256e8..865dcc5 100644 --- a/compat.h +++ b/compat.h @@ -11,6 +11,10 @@ #include +#ifndef clamp_val +#define clamp_val SENSORS_LIMIT +#endif + #ifndef request_muxed_region #if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 28) #define request_muxed_region(start,n,name) __request_region(&ioport_resource, (start), (n), (name)) @@ -40,8 +44,25 @@ static inline int strict_strtol(const char *cp, unsigned int base, long *res) #endif #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 39) -#define kstrtoul strict_strtoul +#define kstrtoul strict_strtoul #define kstrtol strict_strtol #endif +/* + * Some kernel configurations may have CONFIG_HWMON_VID disabled. + * We still have the functios declared as external, so we can not use + * static inline. + */ +#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 + #endif /* COMPAT_H */