Skip to content

Commit

Permalink
net: dsa: Fix scope of eeprom-length property
Browse files Browse the repository at this point in the history
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 <andrew@lunn.ch>
Fixes: 6793abb ("net: dsa: Add support for switch EEPROM access")
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Guenter Roeck authored and David S. Miller committed Apr 29, 2015
1 parent d4c216c commit 50d4964
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/dsa/dsa.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 50d4964

Please sign in to comment.