]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
power: supply: ab8500_bmdata: Use standard phandle
authorLinus Walleij <linus.walleij@linaro.org>
Wed, 6 Oct 2021 22:40:07 +0000 (00:40 +0200)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Wed, 13 Oct 2021 16:15:57 +0000 (18:15 +0200)
Look up the battery using the "monitored-battery" phandle
as is nowadays a standard DT binding. The actual bindings
for these charger elements are not upstream so let's sort
out this mess by conforming to the standard.

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

index 6f5fb794042ce56b3d23887f6da5745467a5b3e7..bfc1245d79123bc2964b104d37b0854460cfc162 100644 (file)
@@ -497,8 +497,7 @@ int ab8500_bm_of_probe(struct device *dev,
        const char *btech;
        int i;
 
-       /* get phandle to 'battery-info' node */
-       battery_node = of_parse_phandle(np, "battery", 0);
+       battery_node = of_parse_phandle(np, "monitored-battery", 0);
        if (!battery_node) {
                dev_err(dev, "battery node or reference missing\n");
                return -EINVAL;