mirror of https://gitee.com/openkylin/linux.git
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 <andrew@lunn.ch>
Fixes: 6793abb4e8
("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>
This commit is contained in:
parent
d4c216c541
commit
50d4964f1d
|
@ -633,7 +633,7 @@ static int dsa_of_probe(struct device *dev)
|
||||||
if (cd->sw_addr > PHY_MAX_ADDR)
|
if (cd->sw_addr > PHY_MAX_ADDR)
|
||||||
continue;
|
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;
|
cd->eeprom_len = eeprom_len;
|
||||||
|
|
||||||
for_each_available_child_of_node(child, port) {
|
for_each_available_child_of_node(child, port) {
|
||||||
|
|
Loading…
Reference in New Issue