Skip to content

Commit

Permalink
intel_mid_battery: Fix battery scaling
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Alan Cox authored and Anton Vorontsov committed Aug 10, 2010
1 parent 08a9e07 commit f59f5bc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/power/intel_mid_battery.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

/**
Expand Down

0 comments on commit f59f5bc

Please sign in to comment.