提交 50d4964f 编写于 作者: G Guenter Roeck 提交者: 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: NAndrew Lunn <andrew@lunn.ch>
Fixes: 6793abb4 ("net: dsa: Add support for switch EEPROM access")
Signed-off-by: NGuenter Roeck <linux@roeck-us.net>
Acked-by: NAndrew Lunn <andrew@lunn.ch>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册