-
由 Sven Neumann 提交于
A check against division by zero was modified in commit b0525b48. Since this change time_to_empty_now is always reported as zero while the battery is discharging and as a negative value while the battery is charging. This is because current is negative while the battery is discharging. Fix the check introduced by commit b0525b48 so that time_to_empty_now is reported correctly during discharge and as zero while charging. Signed-off-by: NSven Neumann <s.neumann@raumfeld.com> Acked-by: NDaniel Mack <daniel@caiaq.de> Cc: stable@kernel.org [2.6.32..2.6.36] Signed-off-by: NAnton Vorontsov <cbouatmailru@gmail.com>
86af9503