Commit e81d00a6 authored by Javier Carrasco's avatar Javier Carrasco Committed by David S. Miller
Browse files

net: mvpp2: use port_count to remove ports

As discussed in [1], there is no need to iterate over child nodes to
remove the list of ports. Instead, a loop up to `port_count` ports can
be used, and is in fact more reliable in case the child node
availability changes.

The suggested approach removes the need for the `fwnode` and
`port_fwnode` variables in mvpp2_remove() as well.

Link: https://lore.kernel.org/all/ZqdRgDkK1PzoI2Pf@shell.armlinux.org.uk/

 [1]
Suggested-by: default avatarRussell King <linux@armlinux.org.uk>
Signed-off-by: default avatarJavier Carrasco <javier.carrasco.cruz@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 80d021bc
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment