aboutsummaryrefslogtreecommitdiffstats
path: root/net/dsa/slave.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/dsa/slave.c')
-rw-r--r--net/dsa/slave.c28
1 files changed, 0 insertions, 28 deletions
diff --git a/net/dsa/slave.c b/net/dsa/slave.c
index 7d0c19e7edcf..aec78f5aca72 100644
--- a/net/dsa/slave.c
+++ b/net/dsa/slave.c
@@ -1058,27 +1058,6 @@ static struct device_type dsa_type = {
1058 .name = "dsa", 1058 .name = "dsa",
1059}; 1059};
1060 1060
1061static ssize_t tagging_show(struct device *d, struct device_attribute *attr,
1062 char *buf)
1063{
1064 struct net_device *dev = to_net_dev(d);
1065 struct dsa_port *dp = dsa_slave_to_port(dev);
1066
1067 return sprintf(buf, "%s\n",
1068 dsa_tag_protocol_to_str(dp->cpu_dp->tag_ops));
1069}
1070static DEVICE_ATTR_RO(tagging);
1071
1072static struct attribute *dsa_slave_attrs[] = {
1073 &dev_attr_tagging.attr,
1074 NULL
1075};
1076
1077static const struct attribute_group dsa_group = {
1078 .name = "dsa",
1079 .attrs = dsa_slave_attrs,
1080};
1081
1082static void dsa_slave_phylink_validate(struct net_device *dev, 1061static void dsa_slave_phylink_validate(struct net_device *dev,
1083 unsigned long *supported, 1062 unsigned long *supported,
1084 struct phylink_link_state *state) 1063 struct phylink_link_state *state)
@@ -1374,14 +1353,8 @@ int dsa_slave_create(struct dsa_port *port)
1374 goto out_phy; 1353 goto out_phy;
1375 } 1354 }
1376 1355
1377 ret = sysfs_create_group(&slave_dev->dev.kobj, &dsa_group);
1378 if (ret)
1379 goto out_unreg;
1380
1381 return 0; 1356 return 0;
1382 1357
1383out_unreg:
1384 unregister_netdev(slave_dev);
1385out_phy: 1358out_phy:
1386 rtnl_lock(); 1359 rtnl_lock();
1387 phylink_disconnect_phy(p->dp->pl); 1360 phylink_disconnect_phy(p->dp->pl);
@@ -1405,7 +1378,6 @@ void dsa_slave_destroy(struct net_device *slave_dev)
1405 rtnl_unlock(); 1378 rtnl_unlock();
1406 1379
1407 dsa_slave_notify(slave_dev, DSA_PORT_UNREGISTER); 1380 dsa_slave_notify(slave_dev, DSA_PORT_UNREGISTER);
1408 sysfs_remove_group(&slave_dev->dev.kobj, &dsa_group);
1409 unregister_netdev(slave_dev); 1381 unregister_netdev(slave_dev);
1410 phylink_destroy(dp->pl); 1382 phylink_destroy(dp->pl);
1411 free_percpu(p->stats64); 1383 free_percpu(p->stats64);