[PATCH] x86-64: x86-64 add Intel Core related PMU MSRs definitions
[safe/jmp/linux-2.6] / include / linux / hwmon.h
index bf90e60..0efd994 100644 (file)
@@ -20,5 +20,16 @@ struct class_device *hwmon_device_register(struct device *dev);
 
 void hwmon_device_unregister(struct class_device *cdev);
 
+/* Scale user input to sensible values */
+static inline int SENSORS_LIMIT(long value, long low, long high)
+{
+       if (value < low)
+               return low;
+       else if (value > high)
+               return high;
+       else
+               return value;
+}
+
 #endif