summaryrefslogtreecommitdiff
path: root/net/dsa
diff options
context:
space:
mode:
authorGuenter Roeck <linux@roeck-us.net>2015-04-29 20:56:15 +0300
committerDavid S. Miller <davem@davemloft.net>2015-04-29 22:35:04 +0300
commit50d4964f1d0411d82cca593f2664bfab7f82dbbf (patch)
tree186530c55c50f3eb9e5c3c6d53be1fc52d594acf /net/dsa
parentd4c216c54197d741ed8b7ca54f13645dfb3eacde (diff)
downloadlinux-50d4964f1d0411d82cca593f2664bfab7f82dbbf.tar.xz
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: 6793abb4e849 ("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>
Diffstat (limited to 'net/dsa')
-rw-r--r--net/dsa/dsa.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/dsa/dsa.c b/net/dsa/dsa.c
index 079a224471e7..e6f6cc3a1bcf 100644
--- a/net/dsa/dsa.c
+++ b/net/dsa/dsa.c
@@ -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) {