From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966441AbbD2SMm (ORCPT ); Wed, 29 Apr 2015 14:12:42 -0400 Received: from vps0.lunn.ch ([178.209.37.122]:44129 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S966400AbbD2SMg (ORCPT ); Wed, 29 Apr 2015 14:12:36 -0400 Date: Wed, 29 Apr 2015 20:07:59 +0200 From: Andrew Lunn To: Guenter Roeck Cc: "David S. Miller" , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] net: dsa: Fix scope of eeprom-length property Message-ID: <20150429180759.GF6504@lunn.ch> References: <1430330175-21977-1-git-send-email-linux@roeck-us.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1430330175-21977-1-git-send-email-linux@roeck-us.net> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Apr 29, 2015 at 10:56:15AM -0700, Guenter Roeck wrote: > 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 --- > net/dsa/dsa.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > 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) { > -- > 2.1.0 >