net: dsa: extract dsa switch tree setup and removal
authorFlorian Fainelli <f.fainelli@gmail.com>
Thu, 5 Mar 2015 20:35:08 +0000 (12:35 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 6 Mar 2015 05:18:20 +0000 (00:18 -0500)
commitc86e59b9e63659bb7fc2ba1781aabe2f37aaf10b
tree9b62ef1646e406ee2a7d70fb2fdcf8de782c3e4d
parent59299031038f3ea92cf484bc4a68d16ad4bb3050
net: dsa: extract dsa switch tree setup and removal

Extract the core logic that setups a 'struct dsa_switch_tree' and
removes it, update dsa_probe() and dsa_remove() to use the two helper
functions. This will be useful to allow for other callers to setup
this structure differently.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/dsa/dsa.c