提交 041d4bbf 编写于 作者: Z Zhang Rui 提交者: Len Brown

ACPI: CELSIUS_TO_KELVIN fixup

Fix an imprecision in CELSIUS_TO_KELVIN and move these
two macroes to a proper place.
Signed-off-by: NZhang Rui <rui.zhang@intel.com>
Signed-off-by: NThomas Sujith <sujith.thomas@intel.com>
Signed-off-by: NLen Brown <len.brown@intel.com>
上级 20733939
......@@ -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");
......
......@@ -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];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册