[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAGVrzcYgje8G-e5B9JpCoS1fbLF-pmgWgvzzkiAVmN2YQdt6NA@mail.gmail.com>
Date: Fri, 16 May 2014 09:12:12 -0700
From: Florian Fainelli <f.fainelli@...il.com>
To: Fabian Godehardt <fg@...ix.com>
Cc: netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH] net/dsa/dsa.c: increment chip_index during of_node
handling on dsa_of_probe()
2014-05-15 21:21 GMT-07:00 Fabian Godehardt <fg@...ix.com>:
> Adding more than one chip on device-tree currently causes the probing
> routine to always use the first chips data pointer.
This looks good to me, your patch subject should be something like
"net: dsa: increment chip_index during of_node handling in
dsa_of_probe()"
>
> Signed-off-by: Fabian Godehardt <fg@...ix.com>
Acked-by: Florian Fainelli <f.fainelli@...il.com>
> ---
> net/dsa/dsa.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/net/dsa/dsa.c b/net/dsa/dsa.c
> index 0eb5d5e..5db37ce 100644
> --- a/net/dsa/dsa.c
> +++ b/net/dsa/dsa.c
> @@ -406,8 +406,9 @@ static int dsa_of_probe(struct platform_device *pdev)
> goto out_free;
> }
>
> - chip_index = 0;
> + chip_index = -1;
> for_each_available_child_of_node(np, child) {
> + chip_index++;
> cd = &pd->chip[chip_index];
>
> cd->mii_bus = &mdio_bus->dev;
> --
> 1.8.2.61.g7b9a419
>
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Florian
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists