net: dsa: Fix scope of eeprom-length property
Subsystems (3)
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.
Reported-by Andrew Lunn <[email protected]>
Fixes 6793abb4e849 ("net: dsa: Add support for switch EEPROM access")
Signed-off-by Guenter Roeck <[email protected]>
--- net/dsa/dsa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/dsa/dsa.c +1 -1
@@ -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
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.
Reported-by Andrew Lunn <[email protected]>Fixes 6793abb4e849 ("net: dsa: Add support for switch EEPROM access")Signed-off-by Guenter Roeck <[email protected]>
Acked-by Andrew Lunn <[email protected]?
Thanks
Andrew
Quoted 20 lines
--- net/dsa/dsa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)net/dsa/dsa.c +1
-1@@ -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
From: Guenter Roeck <[email protected]>
Date: Wed, 29 Apr 2015 10:56:15 -0700
Quoted 6 lines
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.
Reported-by Andrew Lunn <[email protected]>Fixes 6793abb4e849 ("net: dsa: Add support for switch EEPROM access")Signed-off-by Guenter Roeck <[email protected]>
Applied, thanks.