]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/linux/hwmon.h
ntp: handle leap second via timer
[linux-2.6-omap-h63xx.git] / include / linux / hwmon.h
index bf90e6001e3bb4643cb9926bb550c0b42a88567a..6b6ee702b007406d44352f1104a43f4fb4d91cd7 100644 (file)
 
 #include <linux/device.h>
 
-struct class_device *hwmon_device_register(struct device *dev);
-
-void hwmon_device_unregister(struct class_device *cdev);
+struct device *hwmon_device_register(struct device *dev);
+
+void hwmon_device_unregister(struct device *dev);
+
+/* 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