From 59584857be1a4b85574a595156985eba55882a7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pali=20Roh=C3=A1r?= Date: Thu, 28 Mar 2013 17:42:23 +0100 Subject: rx51_battery: Fix reporting temperature MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch fixing units (1/10 °C) in which is temperature reported. Signed-off-by: Pali Rohár Signed-off-by: Anton Vorontsov --- drivers/power/rx51_battery.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'drivers/power/rx51_battery.c') diff --git a/drivers/power/rx51_battery.c b/drivers/power/rx51_battery.c index f9dc9ffd5f97..1a1dcb831a17 100644 --- a/drivers/power/rx51_battery.c +++ b/drivers/power/rx51_battery.c @@ -119,7 +119,7 @@ static int rx51_battery_read_temperature(struct rx51_device_info *di) /* First check for temperature in first direct table */ if (raw < ARRAY_SIZE(rx51_temp_table1)) - return rx51_temp_table1[raw] * 100; + return rx51_temp_table1[raw] * 10; /* Binary search RAW value in second inverse table */ while (max - min > 1) { @@ -132,7 +132,7 @@ static int rx51_battery_read_temperature(struct rx51_device_info *di) break; } - return (rx51_temp_table2_first - min) * 100; + return (rx51_temp_table2_first - min) * 10; } /* -- cgit v1.2.3