Skip to contentSkip to conversation

net: dsa: Fix scope of eeprom-length property

PATCH Applied Guenter Roeck 3 participants 3 messages Apr 29, 2015

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: dsa: Fix scope of eeprom-length property

eeprom-length is a switch property, not a dsa property, and thus needs to be attached to the switch node, not to the dsa node.

Fixes 6793abb4e849 ("net: dsa: Add support for switch EEPROM access")
---
 net/dsa/dsa.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/dsa/dsa.c +1 -1
index 079a224471e7..e6f6cc3a1bcf 100644
@@ -633,7 +633,7 @@ static int dsa_of_probe(struct device *dev)
 		if (cd->sw_addr > PHY_MAX_ADDR)
 			continue;
 
-		if (!of_property_read_u32(np, "eeprom-length", &eeprom_len))
+		if (!of_property_read_u32(child, "eeprom-length", &eeprom_len))
 			cd->eeprom_len = eeprom_len;
 
 		for_each_available_child_of_node(child, port) {
Signature · 1 line
2.1.0
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 6 lines · Guenter Roeck

eeprom-length is a switch property, not a dsa property, and thus needs to be attached to the switch node, not to the dsa node.

Fixes 6793abb4e849 ("net: dsa: Add support for switch EEPROM access")

Thanks
Andrew

Quoted 20 lines
---
 net/dsa/dsa.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/dsa/dsa.c +1 -1
index 079a224471e7..e6f6cc3a1bcf 100644
@@ -633,7 +633,7 @@ static int dsa_of_probe(struct device *dev)
 		if (cd->sw_addr > PHY_MAX_ADDR)
 			continue;
 
-		if (!of_property_read_u32(np, "eeprom-length", &eeprom_len))
+		if (!of_property_read_u32(child, "eeprom-length", &eeprom_len))
 			cd->eeprom_len = eeprom_len;
 
 		for_each_available_child_of_node(child, port) {
Signature · 1 line
2.1.0