From: Alan Cox on 10 Aug 2010 06:10 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(a)linux.intel.com> --- drivers/power/intel_mid_battery.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/power/intel_mid_battery.c b/drivers/power/intel_mid_battery.c index 6430a7b..c61ffec 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; } /** -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
|
Pages: 1 Prev: [PATCH 7/7] vfs: show unreachable paths in getcwd and proc Next: Battery fixes |