提交 acc1ccad 编写于 作者: L Laxman Dewangan 提交者: Mark Brown

regulator: palmas: get regulators node from parent node only

The device tree binding of Palmas regulator driver says as:

palmas_pmis {
	compatible = "ti,palmas-pmic";
	...
	regulators {
		...
	}
};

In this "regulators" subnode is expected to be part of parent node, not
the outside of parent node. Hence to get the regulator node, the correct
call is of_get_child_by_name() rather than of_find_node_by_name() which
actually searches the "regulators" node from the parent node to end of DTS
file.
Signed-off-by: NLaxman Dewangan <ldewangan@nvidia.com>
Reviewed-by: NStephen Warren <swarren@nvidia.com>
Signed-off-by: NMark Brown <broonie@linaro.org>
上级 d0175e7e
......@@ -826,7 +826,7 @@ static void palmas_dt_to_pdata(struct device *dev,
int idx, ret;
node = of_node_get(node);
regulators = of_find_node_by_name(node, "regulators");
regulators = of_get_child_by_name(node, "regulators");
if (!regulators) {
dev_info(dev, "regulator node not found\n");
return;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册