diff options
-rw-r--r-- | drivers/acpi/thermal.c | 3 | ||||
-rw-r--r-- | include/linux/thermal.h | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c index 740036355722..aee371f9daf8 100644 --- a/drivers/acpi/thermal.c +++ b/drivers/acpi/thermal.c | |||
@@ -65,9 +65,6 @@ | |||
65 | #define ACPI_THERMAL_MAX_ACTIVE 10 | 65 | #define ACPI_THERMAL_MAX_ACTIVE 10 |
66 | #define ACPI_THERMAL_MAX_LIMIT_STR_LEN 65 | 66 | #define ACPI_THERMAL_MAX_LIMIT_STR_LEN 65 |
67 | 67 | ||
68 | #define KELVIN_TO_CELSIUS(t) (long)(((long)t-2732>=0) ? ((long)t-2732+5)/10 : ((long)t-2732-5)/10) | ||
69 | #define CELSIUS_TO_KELVIN(t) ((t+273)*10) | ||
70 | |||
71 | #define _COMPONENT ACPI_THERMAL_COMPONENT | 68 | #define _COMPONENT ACPI_THERMAL_COMPONENT |
72 | ACPI_MODULE_NAME("thermal"); | 69 | ACPI_MODULE_NAME("thermal"); |
73 | 70 | ||
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]; |