ds2760_battery: Fix integer overflow for time_to_empty_now
On the device we're currently developing, battery sizes of ~2.8Ah and current flow of ~600mA are typical. With that values, the life_sec computation overflows due to the multiplication by 3600. Signed-off-by: NDaniel Mack <daniel@caiaq.de> Cc: Szabolcs Gyurko <szabolcs.gyurko@tlt.hu> Cc: Matt Reimer <mreimer@vpop.net> Signed-off-by: NAnton Vorontsov <avorontsov@ru.mvista.com>
Showing
想要评论请 注册 或 登录