| commit | b091ca4036825e00b3bb48fa13e8f4a475a91f18 | [log] [tgz] |
|---|---|---|
| author | Xiaozhe Shi <xiaozhes@codeaurora.org> | Thu Nov 01 16:36:58 2012 -0700 |
| committer | Gerrit - the friendly Code Review server <code-review@localhost> | Thu Mar 21 20:31:41 2013 -0700 |
| tree | 892d746e0d85a5ec5ebf40272374b4170efb502f | |
| parent | eeadb78df6c7a35c887c0407cff621f5cf616e41 [diff] |
power: pm8921-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. CRs-Fixed: 418419 Change-Id: I9f38515f35fcddfbdc34ae4f59ffcfc6682033d4 Signed-off-by: Xiaozhe Shi <xiaozhes@codeaurora.org>