net: dsa: split dsa_switch_setup into two functions
authorFlorian Fainelli <f.fainelli@gmail.com>
Thu, 5 Mar 2015 20:35:06 +0000 (12:35 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 6 Mar 2015 05:18:20 +0000 (00:18 -0500)
commitdf197195a5248164df0709fbadc61133897281f5
treeb1a5a3f8088ac6120af7e40815754849811a30ea
parentb324c07ac4771a6ac8f57a3e1897e1b36b0a9ff0
net: dsa: split dsa_switch_setup into two functions

Split the part of dsa_switch_setup() which is responsible for allocating
and initializing a 'struct dsa_switch' and the part which is doing a
given switch device setup and slave network device creation.

This is a preliminary change to allow a separate caller of
dsa_switch_setup_one() which may have externally initialized the
dsa_switch structure, outside of dsa_switch_setup().

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