rx51_battery: Fix reporting temperature
authorPali Rohár <pali.rohar@gmail.com>
Thu, 28 Mar 2013 16:42:23 +0000 (17:42 +0100)
committerAnton Vorontsov <anton@enomsg.org>
Wed, 17 Apr 2013 01:28:02 +0000 (18:28 -0700)
This patch fixing units (1/10 °C) in which is temperature reported.

Signed-off-by: Pali Rohár <pali.rohar@gmail.com>
Signed-off-by: Anton Vorontsov <anton@enomsg.org>
drivers/power/rx51_battery.c

index f9dc9ff..1a1dcb8 100644 (file)
@@ -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;
 }
 
 /*