power: supply: ab8500_fg: Init battery data in bind()
authorLinus Walleij <linus.walleij@linaro.org>
Sat, 20 Nov 2021 15:53:19 +0000 (16:53 +0100)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Mon, 22 Nov 2021 16:16:25 +0000 (17:16 +0100)
commitfc81c435a8a67c72939b44e851111b2991d5ac51
treea2230ef349895836d9b1959185047cb5060fb8ef
parent2a5f41830aadc2d7f4145eae49381133da5df2a3
power: supply: ab8500_fg: Init battery data in bind()

We were assigning some battery data state in probe() but
this is insecure as it depends on the proper probe order
between the components: the charger must probe first so
that the battery data is populated. Move the init to
the bind() call which is certain to happen after the
probe of the master and all components has happened.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/ab8500_fg.c