net: dsa: Split up creating/destroying of DSA and CPU ports
authorAndrew Lunn <andrew@lunn.ch>
Sat, 4 Jun 2016 19:17:01 +0000 (21:17 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sat, 4 Jun 2016 21:29:53 +0000 (14:29 -0700)
commit9b8e895c4e9d217dfa0e48aafa072258e2a3480e
tree4f64692e9a032093e5024c5f65c94e427afd9d03
parent66472fc04e8be62858f29c7798ed17e984c1ab3b
net: dsa: Split up creating/destroying of DSA and CPU ports

Refactor the code to setup a single DSA/CPU port into a function of
its own, and export it, so it can be used by the new binding.

Similarly, refactor the destroy code into a function.  When destroying
the ports, don't put the of node. They should be released at the end
along with the normal ports.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/dsa/dsa.c
net/dsa/dsa_priv.h