summaryrefslogtreecommitdiff
path: root/net/dsa/legacy.c
diff options
context:
space:
mode:
authorVivien Didelot <vivien.didelot@savoirfairelinux.com>2017-10-26 17:50:07 +0300
committerDavid S. Miller <davem@davemloft.net>2017-10-28 12:50:12 +0300
commit57ab1ca215971702df534ae93cd76c15ca084c77 (patch)
tree0df18a97aae74380a6c12003a3f666ee81007beb /net/dsa/legacy.c
parent952c5719aac6587f1e0add97dca79f9e73887f9b (diff)
downloadlinux-57ab1ca215971702df534ae93cd76c15ca084c77.tar.xz
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>
Diffstat (limited to 'net/dsa/legacy.c')
-rw-r--r--net/dsa/legacy.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/net/dsa/legacy.c b/net/dsa/legacy.c
index 93e1b116ef83..ed7aae342fca 100644
--- a/net/dsa/legacy.c
+++ b/net/dsa/legacy.c
@@ -86,7 +86,7 @@ static int dsa_cpu_dsa_setups(struct dsa_switch *ds)
if (!(dsa_is_cpu_port(ds, port) || dsa_is_dsa_port(ds, port)))
continue;
- ret = dsa_cpu_dsa_setup(&ds->ports[port]);
+ ret = dsa_port_fixed_link_register_of(&ds->ports[port]);
if (ret)
return ret;
}
@@ -274,7 +274,7 @@ static void dsa_switch_destroy(struct dsa_switch *ds)
for (port = 0; port < ds->num_ports; port++) {
if (!(dsa_is_cpu_port(ds, port) || dsa_is_dsa_port(ds, port)))
continue;
- dsa_cpu_dsa_destroy(&ds->ports[port]);
+ dsa_port_fixed_link_unregister_of(&ds->ports[port]);
}
if (ds->slave_mii_bus && ds->ops->phy_read)