aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/power
diff options
context:
space:
mode:
authorAlan Cox <alan@linux.intel.com>2010-08-10 05:28:04 -0400
committerAnton Vorontsov <cbouatmailru@gmail.com>2010-08-10 06: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 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,
427static inline unsigned long mAStouAh(unsigned long v) 427static inline unsigned long mAStouAh(unsigned long v)
428{ 428{
429 /* seconds to hours, mA to µA */ 429 /* seconds to hours, mA to µA */
430 return v * 3600 * 1000; 430 return (v * 1000) / 3600;
431} 431}
432 432
433/** 433/**