]> err.no Git - linux-2.6/commitdiff
ACPI: CELSIUS_TO_KELVIN fixup
authorZhang Rui <rui.zhang@intel.com>
Thu, 17 Jan 2008 07:51:19 +0000 (15:51 +0800)
committerLen Brown <len.brown@intel.com>
Sat, 2 Feb 2008 04:20:26 +0000 (23:20 -0500)
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>
drivers/acpi/thermal.c
include/linux/thermal.h

index 740036355722520d08526e2428751852d15c3c0f..aee371f9daf82e92fb0ff06f1b9256b04fab1458 100644 (file)
@@ -65,9 +65,6 @@
 #define ACPI_THERMAL_MAX_ACTIVE        10
 #define ACPI_THERMAL_MAX_LIMIT_STR_LEN 65
 
-#define KELVIN_TO_CELSIUS(t)    (long)(((long)t-2732>=0) ? ((long)t-2732+5)/10 : ((long)t-2732-5)/10)
-#define CELSIUS_TO_KELVIN(t)   ((t+273)*10)
-
 #define _COMPONENT             ACPI_THERMAL_COMPONENT
 ACPI_MODULE_NAME("thermal");
 
index e4b76c7afb5171093c32f5359f9fc3a8bf1e410d..bba7712cadc749cc63513c583cce475dce899888 100644 (file)
@@ -61,6 +61,10 @@ struct thermal_cooling_device {
        struct list_head node;
 };
 
+#define KELVIN_TO_CELSIUS(t)   (long)(((long)t-2732 >= 0) ?    \
+                               ((long)t-2732+5)/10 : ((long)t-2732-5)/10)
+#define CELSIUS_TO_KELVIN(t)   ((t)*10+2732)
+
 struct thermal_zone_device {
        int id;
        char type[THERMAL_NAME_LENGTH];