Skip to contentSkip to conversation

pfuze100-regulator: Fix of_node_get() parameter

PATCH Applied Fabio Estevam 3 participants 4 messages Feb 19, 2014 Voltage and current regulator framework

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pfuze100-regulator: Fix of_node_get() parameter

From: Fabio Estevam <[email protected]>

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.

---
 drivers/regulator/pfuze100-regulator.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/regulator/pfuze100-regulator.c +1 -1
index c1cb202..dcb03ce 100644
@@ -250,7 +250,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;
 
Signature · 1 line
1.8.1.2
Acked-by on v1 1/1
#1 lore raw
Quoted 10 lines · Fabio Estevam

From: Fabio Estevam <[email protected]>

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

Quoted 5 lines

Now that of_get_child_by_name() is used we should adjust the device_node pointer 'np' to not get the parent node anymore.

Thanks for the fix Fabio.

Mark,
There are a few more instances that should be fixed like this one. How would you prefer to handle them - Resend the complete patch or send just the incremental fix?

Signature · 2 lines
With warm regards,
Sachin
maintainer
#2 lore raw
Quoted 3 lines · Sachin Kamat

There are a few more instances that should be fixed like this one. How would you prefer to handle them - Resend the complete patch or send just the incremental fix?

Incremental fixes always.