commit | a81851f6a7aa107107ff37b643196dbd090a1273 | [log] [tgz] |
---|---|---|
author | Xiaozhe Shi <xiaozhes@codeaurora.org> | Thu Nov 01 16:36:58 2012 -0700 |
committer | Xiaozhe Shi <xiaozhes@codeaurora.org> | Thu Dec 06 15:14:47 2012 -0800 |
tree | 146e881a455f0007ce6e3319b3638e0f164dd895 | |
parent | ba3bdd3e389c2859284fd55589e05ec3310b7027 [diff] |
power: qpnp-bms: fix divide by 0 issue when charging The current code can divide by zero in the scale_soc_while_chg function if calculated_soc drops while charging. Fix the issue by not scaling soc if catch_up_time_us is zero. Change-Id: I9cc2867b0c961a9b5c7031767b956bbfecfeebe6 Signed-off-by: Xiaozhe Shi <xiaozhes@codeaurora.org>