Commit 50d4964f authored by Guenter Roeck's avatar Guenter Roeck Committed by David S. Miller

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: default avatarAndrew Lunn <andrew@lunn.ch>
Fixes: 6793abb4 ("net: dsa: Add support for switch EEPROM access")
Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
Acked-by: default avatarAndrew Lunn <andrew@lunn.ch>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d4c216c5
......@@ -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) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment