From 4cfa892c03b35f3c61d93e0d8d97ff8db074818f Mon Sep 17 00:00:00 2001 From: Philip Rakity Date: Fri, 12 Aug 2011 21:18:18 -0700 Subject: [PATCH] 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-format-patch failed