Commit 5da643b2 authored by Wenyou Yang's avatar Wenyou Yang Committed by Sebastian Reichel

power: supply: act8945a_charger: Achieve properties from its node

Since the act8945a_charger is regarded as a sub-device, all properties will
be assigned to its own device node. All properties can be achieved from its
own node, instead of from its parent device.
Signed-off-by: default avatarWenyou Yang <wenyou.yang@atmel.com>
Signed-off-by: default avatarSebastian Reichel <sre@kernel.org>
parent 2fe92175
...@@ -328,11 +328,11 @@ static int act8945a_charger_probe(struct platform_device *pdev) ...@@ -328,11 +328,11 @@ static int act8945a_charger_probe(struct platform_device *pdev)
return -EINVAL; return -EINVAL;
} }
ret = act8945a_charger_config(pdev->dev.parent, charger); ret = act8945a_charger_config(&pdev->dev, charger);
if (ret) if (ret)
return ret; return ret;
psy_cfg.of_node = pdev->dev.parent->of_node; psy_cfg.of_node = pdev->dev.of_node;
psy_cfg.drv_data = charger; psy_cfg.drv_data = charger;
psy = devm_power_supply_register(&pdev->dev, psy = devm_power_supply_register(&pdev->dev,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment