mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
rx51_battery: Fix reporting temperature
This patch fixing units (1/10 °C) in which is temperature reported. Signed-off-by: Pali Rohár <[email protected]> Signed-off-by: Anton Vorontsov <[email protected]>
This commit is contained in:
parent
0bbb06ed56
commit
59584857be
1 changed files with 2 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in a new issue