summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabio Estevam <fabio.estevam@freescale.com>2014-02-18 23:46:14 -0300
committerRobin Gong <b38343@freescale.com>2014-05-26 14:01:30 +0800
commitd52df5f467c59d90ec60f0436ff2320953b2ca93 (patch)
treeb61357de9ca054899cd4747b54efd9a57e69be11
parentce1917efa634a653e8a6f28e6b544084bbde05a2 (diff)
pfuze100-regulator: Fix of_node_get() parameter
Since commit d7857c42 (regulator: pfuze100: Use of_get_child_by_name) we get the following probe failure: pfuze100-regulator 1-0008: Full layer: 1, Metal layer: 0 pfuze100-regulator 1-0008: FAB: 0, FIN: 0 pfuze100-regulator 1-0008: regulators node not found pfuze100-regulator: probe of 1-0008 failed with error -22 Now that of_get_child_by_name() is used we should adjust the device_node pointer 'np' to not get the parent node anymore. Suggested-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Acked-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org> (cherry picked from commit 0780208ff201feb45e12ebecb39ecac4740b1244)
-rw-r--r--drivers/regulator/pfuze100-regulator.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/regulator/pfuze100-regulator.c b/drivers/regulator/pfuze100-regulator.c
index 15059c74cc8e..b9c1b9a906d6 100644
--- a/drivers/regulator/pfuze100-regulator.c
+++ b/drivers/regulator/pfuze100-regulator.c
@@ -295,7 +295,7 @@ static int pfuze_parse_regulators_dt(struct pfuze_chip *chip)
struct device_node *np, *parent;
int ret;
- np = of_node_get(dev->parent->of_node);
+ np = of_node_get(dev->of_node);
if (!np)
return 0;