diff options
author | Zhang Rui <rui.zhang@intel.com> | 2008-01-17 02:51:19 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2008-02-01 23:20:26 -0500 |
commit | 041d4bbf128f645fe53bb22309efb9db14dbf5b5 (patch) | |
tree | 2599aff53ec6e492c202f6db88deee7ea988575c /include/linux | |
parent | 207339398ecb0835331c748612898dad2a09fdec (diff) |
ACPI: CELSIUS_TO_KELVIN fixup
Fix an imprecision in CELSIUS_TO_KELVIN and move these
two macroes to a proper place.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Thomas Sujith <sujith.thomas@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/thermal.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/thermal.h b/include/linux/thermal.h index e4b76c7afb51..bba7712cadc7 100644 --- a/include/linux/thermal.h +++ b/include/linux/thermal.h | |||
@@ -61,6 +61,10 @@ struct thermal_cooling_device { | |||
61 | struct list_head node; | 61 | struct list_head node; |
62 | }; | 62 | }; |
63 | 63 | ||
64 | #define KELVIN_TO_CELSIUS(t) (long)(((long)t-2732 >= 0) ? \ | ||
65 | ((long)t-2732+5)/10 : ((long)t-2732-5)/10) | ||
66 | #define CELSIUS_TO_KELVIN(t) ((t)*10+2732) | ||
67 | |||
64 | struct thermal_zone_device { | 68 | struct thermal_zone_device { |
65 | int id; | 69 | int id; |
66 | char type[THERMAL_NAME_LENGTH]; | 70 | char type[THERMAL_NAME_LENGTH]; |