diff options
author | Pali Rohár <pali.rohar@gmail.com> | 2013-03-28 12:42:23 -0400 |
---|---|---|
committer | Anton Vorontsov <anton@enomsg.org> | 2013-04-16 21:28:02 -0400 |
commit | 59584857be1a4b85574a595156985eba55882a7e (patch) | |
tree | 18140687b03054f7658b63df4cc674c7b44be8a2 | |
parent | 0bbb06ed564d211d10eae12bdb423fce6178468f (diff) |
rx51_battery: Fix reporting temperature
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>
-rw-r--r-- | drivers/power/rx51_battery.c | 4 |
1 files changed, 2 insertions, 2 deletions
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) | |||
119 | 119 | ||
120 | /* First check for temperature in first direct table */ | 120 | /* First check for temperature in first direct table */ |
121 | if (raw < ARRAY_SIZE(rx51_temp_table1)) | 121 | if (raw < ARRAY_SIZE(rx51_temp_table1)) |
122 | return rx51_temp_table1[raw] * 100; | 122 | return rx51_temp_table1[raw] * 10; |
123 | 123 | ||
124 | /* Binary search RAW value in second inverse table */ | 124 | /* Binary search RAW value in second inverse table */ |
125 | while (max - min > 1) { | 125 | while (max - min > 1) { |
@@ -132,7 +132,7 @@ static int rx51_battery_read_temperature(struct rx51_device_info *di) | |||
132 | break; | 132 | break; |
133 | } | 133 | } |
134 | 134 | ||
135 | return (rx51_temp_table2_first - min) * 100; | 135 | return (rx51_temp_table2_first - min) * 10; |
136 | } | 136 | } |
137 | 137 | ||
138 | /* | 138 | /* |