浏览代码

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>
Alan Cox 15 年之前
父节点
当前提交
f59f5bcb60
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/power/intel_mid_battery.c

+ 1 - 1
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;
 }
 
 /**