* [PATCH] net/dsa/dsa.c: increment chip_index during of_node handling on dsa_of_probe()
@ 2014-05-16 4:21 Fabian Godehardt
2014-05-16 16:12 ` Florian Fainelli
2014-05-16 20:56 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Fabian Godehardt @ 2014-05-16 4:21 UTC (permalink / raw)
To: netdev; +Cc: Fabian Godehardt
Adding more than one chip on device-tree currently causes the probing
routine to always use the first chips data pointer.
Signed-off-by: Fabian Godehardt <fg@emlix.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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] net/dsa/dsa.c: increment chip_index during of_node handling on dsa_of_probe()
2014-05-16 4:21 [PATCH] net/dsa/dsa.c: increment chip_index during of_node handling on dsa_of_probe() Fabian Godehardt
@ 2014-05-16 16:12 ` Florian Fainelli
2014-05-16 20:56 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Florian Fainelli @ 2014-05-16 16:12 UTC (permalink / raw)
To: Fabian Godehardt; +Cc: netdev
2014-05-15 21:21 GMT-07:00 Fabian Godehardt <fg@emlix.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@emlix.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.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@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Florian
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] net/dsa/dsa.c: increment chip_index during of_node handling on dsa_of_probe()
2014-05-16 4:21 [PATCH] net/dsa/dsa.c: increment chip_index during of_node handling on dsa_of_probe() Fabian Godehardt
2014-05-16 16:12 ` Florian Fainelli
@ 2014-05-16 20:56 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2014-05-16 20:56 UTC (permalink / raw)
To: fg; +Cc: netdev
From: Fabian Godehardt <fg@emlix.com>
Date: Fri, 16 May 2014 06:21:44 +0200
> Adding more than one chip on device-tree currently causes the probing
> routine to always use the first chips data pointer.
>
> Signed-off-by: Fabian Godehardt <fg@emlix.com>
Applied, thank you.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-05-16 20:56 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-16 4:21 [PATCH] net/dsa/dsa.c: increment chip_index during of_node handling on dsa_of_probe() Fabian Godehardt
2014-05-16 16:12 ` Florian Fainelli
2014-05-16 20:56 ` 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).