diff options
author | Vivien Didelot <vivien.didelot@savoirfairelinux.com> | 2017-10-27 15:55:18 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-10-31 22:47:36 -0400 |
commit | 1838fa89a22cbc9ec87e995683e241a82d87e6df (patch) | |
tree | 34be73f20faedfd7c979548b5336cfcb4d61cd56 /net/dsa/legacy.c | |
parent | cbabb0ac01052f79cf96d7b7e3d3451ffd275864 (diff) |
net: dsa: get port name at parse time
Get the optional "label" property and assign a default one directly at
parse time instead of doing it when creating the slave.
For legacy, simply assign the port name stored in cd->port_names.
Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dsa/legacy.c')
-rw-r--r-- | net/dsa/legacy.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/dsa/legacy.c b/net/dsa/legacy.c index ed7aae342fca..afe6e1539bd0 100644 --- a/net/dsa/legacy.c +++ b/net/dsa/legacy.c | |||
@@ -115,6 +115,7 @@ static int dsa_switch_setup_one(struct dsa_switch *ds, | |||
115 | name = cd->port_names[i]; | 115 | name = cd->port_names[i]; |
116 | if (name == NULL) | 116 | if (name == NULL) |
117 | continue; | 117 | continue; |
118 | dp->name = name; | ||
118 | 119 | ||
119 | if (!strcmp(name, "cpu")) { | 120 | if (!strcmp(name, "cpu")) { |
120 | if (dst->cpu_dp) { | 121 | if (dst->cpu_dp) { |