net: dsa: move fixed link registration helpers
authorVivien Didelot <vivien.didelot@savoirfairelinux.com>
Thu, 26 Oct 2017 14:50:07 +0000 (10:50 -0400)
committerDavid S. Miller <davem@davemloft.net>
Sat, 28 Oct 2017 09:50:12 +0000 (18:50 +0900)
commit57ab1ca215971702df534ae93cd76c15ca084c77
tree0df18a97aae74380a6c12003a3f666ee81007beb
parent952c5719aac6587f1e0add97dca79f9e73887f9b
net: dsa: move fixed link registration helpers

The new bindings (dsa2.c) and the old bindings (legacy.c) share two
helpers dsa_cpu_dsa_setup and dsa_cpu_dsa_destroy, used to register or
deregister a fixed PHY if a given port has a corresponding device node.

Unclutter the code by moving them into two new port.c helpers,
dsa_port_fixed_link_register_of and dsa_port_fixed_link_(un)register_of.

Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/dsa/dsa.c
net/dsa/dsa2.c
net/dsa/dsa_priv.h
net/dsa/legacy.c
net/dsa/port.c