From: Philip Rakity Date: Sat, 13 Aug 2011 04:18:18 +0000 (-0700) Subject: max17042_battery: Divide by 0 crash because r_sns init too late X-Git-Tag: v3.3-rc1~98^2~57 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4cfa892c03b35f3c61d93e0d8d97ff8db074818f;p=pandora-kernel.git max17042_battery: Divide by 0 crash because r_sns init too late On MMP2 brownstone divide by 0 error since probe sets r_sns after calling power_supply_register. Move the code up a few lines. r_sns comes from the platform data. PROP_CURRENT_AVG and PROP_CURRENT divide the result by r_sns. Signed-off-by: Philip Rakity Acked-by: MyungJoo Ham Signed-off-by: Anton Vorontsov --- Reading git-diff-tree failed