Message ID | 20211006224008.394191-2-linus.walleij@linaro.org |
---|---|
State | Accepted |
Commit | 1a6784359540dcfbf4fa73c07868b80c8405cc14 |
Headers | show |
Series | [1/3] dt-bindings: power: supply: ab8500: Standard monitored-battery | expand |
diff --git a/drivers/power/supply/ab8500_bmdata.c b/drivers/power/supply/ab8500_bmdata.c index 6f5fb794042c..bfc1245d7912 100644 --- a/drivers/power/supply/ab8500_bmdata.c +++ b/drivers/power/supply/ab8500_bmdata.c @@ -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;
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> --- ChangeLog v1->v2: - Rebase on v5.13-rc1 --- drivers/power/supply/ab8500_bmdata.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- 2.31.1