netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] net: dsa: Fix scope of eeprom-length property
@ 2015-04-29 17:56 Guenter Roeck
  2015-04-29 18:07 ` Andrew Lunn
  2015-04-29 19:35 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Guenter Roeck @ 2015-04-29 17:56 UTC (permalink / raw)
  To: David S. Miller; +Cc: Andrew Lunn, netdev, linux-kernel, Guenter Roeck

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>
---
 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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] net: dsa: Fix scope of eeprom-length property
  2015-04-29 17:56 [PATCH] net: dsa: Fix scope of eeprom-length property Guenter Roeck
@ 2015-04-29 18:07 ` Andrew Lunn
  2015-04-29 19:35 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Andrew Lunn @ 2015-04-29 18:07 UTC (permalink / raw)
  To: Guenter Roeck; +Cc: David S. Miller, netdev, linux-kernel

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 <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?

Thanks
	Andrew

> ---
>  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
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] net: dsa: Fix scope of eeprom-length property
  2015-04-29 17:56 [PATCH] net: dsa: Fix scope of eeprom-length property Guenter Roeck
  2015-04-29 18:07 ` Andrew Lunn
@ 2015-04-29 19:35 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2015-04-29 19:35 UTC (permalink / raw)
  To: linux; +Cc: andrew, netdev, linux-kernel

From: Guenter Roeck <linux@roeck-us.net>
Date: Wed, 29 Apr 2015 10:56:15 -0700

> 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>

Applied, thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-04-29 19:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-29 17:56 [PATCH] net: dsa: Fix scope of eeprom-length property Guenter Roeck
2015-04-29 18:07 ` Andrew Lunn
2015-04-29 19:35 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).