lkml.org 
[lkml]   [2010]   [Nov]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] ds2760_battery: fix calculation of time_to_empty_now
On Fri, Nov 12, 2010 at 11:36:22AM +0100, Sven Neumann wrote:
> 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>

Applied (with Cc: stable@kernel.org [2.6.32..2.6.36]).

Thanks!

--
Anton Vorontsov
email: cbouatmailru@gmail.com
irc://irc.freenode.net/bd2


\
 
 \ /
  Last update: 2010-11-18 15:01    [W:0.038 / U:0.372 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site