commit | bbae8831f407d2d701e5ac74be3104fb86f8ccfe | [log] [tgz] |
---|---|---|
author | Abhijeet Dharmapurikar <adharmap@codeaurora.org> | Tue Feb 14 18:56:42 2012 -0800 |
committer | Abhijeet Dharmapurikar <adharmap@codeaurora.org> | Wed Feb 29 21:02:36 2012 -0800 |
tree | 781ee49c4b5864a1a4217d5892ddb3eb77ff971a | |
parent | 08e7e0a792f32189bd0dadddc880065da9bdab44 [diff] |
power: pm8921-bms: add protection against divide by zero There is a unprotected divide by zero in the driver- when full charge capacity of the battery and unusable charge of the battery are calculated equal. In such a case set state of charge to 0% without the actual division. Change-Id: I57f3333e780396de29435d29c30e54940c657d4e Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>