mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
net/dsa/dsa.c: increment chip_index during of_node handling on dsa_of_probe()
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 <[email protected]> Acked-by: Florian Fainelli <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
2e47b29195
commit
d1c0b471b3
1 changed files with 2 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue