Subject: [PATCH] [acpi thermal] Add helper for getting temp in K Signed-off-by: Patrick Mochel --- drivers/acpi/drivers/thermal/device.c | 5 +++++ drivers/acpi/drivers/thermal/thermal.h | 1 + 2 files changed, 6 insertions(+), 0 deletions(-) applies-to: d881b4daef29e1692d5be914d3176453fd1e5e4d a582d7d369f97bb68ff7e4b9f34e0262be10e4af diff --git a/drivers/acpi/drivers/thermal/device.c b/drivers/acpi/drivers/thermal/device.c index 191de64..132b4aa 100644 --- a/drivers/acpi/drivers/thermal/device.c +++ b/drivers/acpi/drivers/thermal/device.c @@ -43,6 +43,11 @@ long thermal_temp_c(long tempk) return (tempk - 2732 - 5) / 10; } +long thermal_temp_k(long tempc) +{ + return (tempc + 273) * 10; +} + int thermal_get_temp(struct acpi_thermal * at) { diff --git a/drivers/acpi/drivers/thermal/thermal.h b/drivers/acpi/drivers/thermal/thermal.h index abe0639..0128009 100644 --- a/drivers/acpi/drivers/thermal/thermal.h +++ b/drivers/acpi/drivers/thermal/thermal.h @@ -83,3 +83,4 @@ extern int thermal_set_cooling_mode(stru extern void thermal_check(struct acpi_thermal * at); extern long thermal_temp_c(long tempk); +extern long thermal_temp_k(long tempc); --- 0.99.9.GIT