diff options
author | Todd Poynor <toddpoynor@google.com> | 2012-08-06 12:01:51 -0700 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2014-03-19 13:09:18 -0700 |
commit | 0d98b800f5c02def5f2ecb1d0631dc129292647b (patch) | |
tree | 456da4ee3723e290900eb5d04915c317483ed428 /drivers | |
parent | 41772299c50b8ba13640c53ada8332e232e3f4f9 (diff) |
power: android_battery: fix negative temperature display
Change-Id: Ic9798bc5194b6192fec726a8f136867f111e4765
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/power/android_battery.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/power/android_battery.c b/drivers/power/android_battery.c index 85f85f9e4ed8..80c0bd228aa2 100644 --- a/drivers/power/android_battery.c +++ b/drivers/power/android_battery.c @@ -330,11 +330,11 @@ static void android_bat_monitor_work(struct work_struct *work) break; } - pr_info("battery: l=%d v=%d c=%d temp=%d.%d h=%d st=%d type=%s\n", + pr_info("battery: l=%d v=%d c=%d temp=%s%ld.%ld h=%d st=%d type=%s\n", battery->batt_soc, battery->batt_vcell/1000, - battery->batt_current, battery->batt_temp / 10, - battery->batt_temp % 10, battery->batt_health, - battery->charging_status, + battery->batt_current, battery->batt_temp < 0 ? "-" : "", + abs(battery->batt_temp / 10), abs(battery->batt_temp % 10), + battery->batt_health, battery->charging_status, charge_source_str(battery->charge_source)); power_supply_changed(&battery->psy_bat); battery->last_poll = ktime_get_boottime(); |