power: supply: sc2731_charger: Free battery information
authorBaolin Wang <baolin.wang@linaro.org>
Mon, 12 Nov 2018 10:52:38 +0000 (18:52 +0800)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Wed, 5 Dec 2018 22:54:01 +0000 (23:54 +0100)
Free battery information in case of adding battery OCV tables.

Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/sc2731_charger.c

index 49b3f0c..335cb85 100644 (file)
@@ -408,6 +408,8 @@ static int sc2731_charger_hw_init(struct sc2731_charger_info *info)
                        vol_val = (term_voltage - 4200) / 100;
                else
                        vol_val = 0;
+
+               power_supply_put_battery_info(info->psy_usb, &bat_info);
        }
 
        /* Set charge termination current */