Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 165516
b: refs/heads/master
c: b0525b4
h: refs/heads/master
v: v3
  • Loading branch information
Daniel Mack authored and Anton Vorontsov committed Sep 4, 2009
1 parent 019bec5 commit c562a59
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 83a8af0d31cfa6c728a68c00f6b1b518e2dcc03d
refs/heads/master: b0525b48f06714e8d5cf6a3266261b71de8d6dd4
6 changes: 3 additions & 3 deletions trunk/drivers/power/ds2760_battery.c
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,9 @@ static int ds2760_battery_read_status(struct ds2760_device_info *di)
if (di->rem_capacity > 100)
di->rem_capacity = 100;

if (di->current_uA)
di->life_sec = -((di->accum_current_uAh - di->empty_uAh) *
3600L) / di->current_uA;
if (di->current_uA >= 100L)
di->life_sec = -((di->accum_current_uAh - di->empty_uAh) * 36L)
/ (di->current_uA / 100L);
else
di->life_sec = 0;

Expand Down

0 comments on commit c562a59

Please sign in to comment.