summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Cox <alan@linux.intel.com>2010-08-10 11:28:04 +0200
committerAnton Vorontsov <cbouatmailru@gmail.com>2010-08-10 12:35:27 +0200
commitf59f5bcb605f40d418aceb6f6047069435ffac72 (patch)
tree412266b4696b0d137765e425101b376e6ddfa20b
parentintel_mid_battery: Fix the argument order to intel_scu_ipc_command (diff)
downloadlinux-f59f5bcb605f40d418aceb6f6047069435ffac72.tar.xz
linux-f59f5bcb605f40d418aceb6f6047069435ffac72.zip
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>
-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 6430a7bb637b..c61ffec2ff10 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;
}
/**