diff options
author | Sven Neumann <s.neumann@raumfeld.com> | 2010-11-12 11:36:22 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-02-17 15:37:02 -0800 |
commit | 3a3425ed91e96b56ab21227c93d8ce4c94510feb (patch) | |
tree | 0ea609b51f5dcf2b5918ce80367147315b659dc6 /security | |
parent | 518874df037d8db7eb03688586a44a99b840bb2a (diff) |
ds2760_battery: Fix calculation of time_to_empty_now
commit 86af95039b69a90db15294eb1f9c147f1df0a8ea upstream.
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: Sven Neumann <s.neumann@raumfeld.com>
Acked-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'security')
0 files changed, 0 insertions, 0 deletions