aboutsummaryrefslogtreecommitdiff
path: root/drivers/power
diff options
context:
space:
mode:
authorAlan Cox <alan@linux.intel.com>2010-08-10 10:28:04 +0100
committerAnton Vorontsov <cbouatmailru@gmail.com>2010-08-10 14:35:27 +0400
commitf59f5bcb605f40d418aceb6f6047069435ffac72 (patch)
tree412266b4696b0d137765e425101b376e6ddfa20b /drivers/power
parent08a9e07e3fcfcd8df23b57edef8c6876f51020a1 (diff)
intel_mid_battery: Fix battery scaling
There are 3600 seconds per not 3600 hours per second. Correcting this along with the previous fix gives sensible numbers. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
Diffstat (limited to 'drivers/power')
-rw-r--r--drivers/power/intel_mid_battery.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/power/intel_mid_battery.c b/drivers/power/intel_mid_battery.c
index 6430a7bb637..c61ffec2ff1 100644
--- a/drivers/power/intel_mid_battery.c
+++ b/drivers/power/intel_mid_battery.c
@@ -427,7 +427,7 @@ static int pmic_usb_get_property(struct power_supply *psy,
static inline unsigned long mAStouAh(unsigned long v)
{
/* seconds to hours, mA to µA */
- return v * 3600 * 1000;
+ return (v * 1000) / 3600;
}
/**