From: Guenter Roeck Date: Wed, 29 Apr 2015 17:56:15 +0000 (-0700) Subject: net: dsa: Fix scope of eeprom-length property X-Git-Tag: v4.9.8~4314^2~9 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=50d4964f1d0411d82cca593f2664bfab7f82dbbf;p=platform%2Fkernel%2Flinux-rpi3.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 Fixes: 6793abb4e849 ("net: dsa: Add support for switch EEPROM access") Signed-off-by: Guenter Roeck Acked-by: Andrew Lunn Signed-off-by: David S. Miller --- diff --git a/net/dsa/dsa.c b/net/dsa/dsa.c index 079a224..e6f6cc3 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) {