From acc1ccadb85fc47238e9d92b2336c04c9fc64d53 Mon Sep 17 00:00:00 2001 From: Laxman Dewangan Date: Thu, 3 Oct 2013 19:36:37 +0530 Subject: 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: Laxman Dewangan Reviewed-by: Stephen Warren Signed-off-by: Mark Brown --- drivers/regulator/palmas-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers') diff --git a/drivers/regulator/palmas-regulator.c b/drivers/regulator/palmas-regulator.c index 1b31e414fde1..d68f05b105b5 100644 --- a/drivers/regulator/palmas-regulator.c +++ b/drivers/regulator/palmas-regulator.c @@ -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; -- cgit v1.2.3