netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: Tobias Waldekranz <tobias@waldekranz.com>, netdev@vger.kernel.org
Subject: Re: [PATCH] dsa: correctly determine the number of switches in a system
Date: Thu, 05 Feb 2015 11:41:43 -0800	[thread overview]
Message-ID: <54D3C777.4040901@gmail.com> (raw)
In-Reply-To: <20150205135409.GB29383@gmail.com>

On 05/02/15 05:54, Tobias Waldekranz wrote:
> The number of connected switches was sourced from the number of
> children to the DSA node, change it to the number of available
> children, skipping any disabled switches.
> 
> Signed-off-by: Tobias Waldekranz <tobias@waldekranz.com>

Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Fixes: 5e95329b701c4 ("dsa: add device tree bindings to register DSA
switches")

> ---
>  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 3731714..2173402 100644
> --- a/net/dsa/dsa.c
> +++ b/net/dsa/dsa.c
> @@ -603,7 +603,7 @@ static int dsa_of_probe(struct platform_device *pdev)
>  
>  	pdev->dev.platform_data = pd;
>  	pd->netdev = &ethernet_dev->dev;
> -	pd->nr_chips = of_get_child_count(np);
> +	pd->nr_chips = of_get_available_child_count(np);
>  	if (pd->nr_chips > DSA_MAX_SWITCHES)
>  		pd->nr_chips = DSA_MAX_SWITCHES;
>  
> 


-- 
Florian

  reply	other threads:[~2015-02-05 19:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-05 13:54 [PATCH] dsa: correctly determine the number of switches in a system Tobias Waldekranz
2015-02-05 19:41 ` Florian Fainelli [this message]
2015-02-08  6:08 ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54D3C777.4040901@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=tobias@waldekranz.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).