power_supply: fix up CHARGE_COUNTER output to be more precise
authorAndres Salomon <dilinger@queued.net>
Wed, 14 May 2008 23:20:38 +0000 (16:20 -0700)
committerAnton Vorontsov <cbouatmailru@gmail.com>
Sun, 18 May 2008 21:44:36 +0000 (01:44 +0400)
commit75d8807962fc7529b4946e9ec92cae197be5a967
tree9e5370ea7e1c727a18c4cb47c8403779456cbebe
parent8e552c36d90c03d2cabf5373788998966751b609
power_supply: fix up CHARGE_COUNTER output to be more precise

As Richard Smith pointed out, ACR * 6250 / 15 provides for less
precision loss than ACR * 4167 / 10, _and_ it doesn't overflow.  Switch
to using that equation for CHARGE_COUNTER.

Signed-off-by: Andres Salomon <dilinger@debian.org>
Cc: "Richard A. Smith" <richard@laptop.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
drivers/power/olpc_battery.c