From d351ae74c3c7c27b960fd03ebc955f99ac76a897 Mon Sep 17 00:00:00 2001 From: Todd Poynor Date: Thu, 23 Aug 2012 13:41:54 -0700 Subject: [PATCH] power: android-battery: use 1/10th deg C units for temperature Same units as power_supply, don't need 1/10000 deg C and conversion is error-prone. Change-Id: I8cf146d2a7725df2dacc415daa66b2986b69f2a7 Signed-off-by: Todd Poynor --- drivers/power/android_battery.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/power/android_battery.c b/drivers/power/android_battery.c index 39f459303882..e3b1f5e87b28 100644 --- a/drivers/power/android_battery.c +++ b/drivers/power/android_battery.c @@ -188,7 +188,7 @@ static int android_ac_get_property(struct power_supply *ps, static void android_bat_get_temp(struct android_bat_data *battery) { - int batt_temp = 42000; /* 4.2C */ + int batt_temp = 42; /* 4.2C */ int health = battery->batt_health; if (battery->pdata->get_temperature) @@ -219,7 +219,7 @@ static void android_bat_get_temp(struct android_bat_data *battery) } } - battery->batt_temp = batt_temp/1000; + battery->batt_temp = batt_temp; } static void android_bat_update_data(struct android_bat_data *battery) -- 2.34.1