diff options
author | Vivien Didelot <vivien.didelot@savoirfairelinux.com> | 2016-04-18 16:10:24 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-04-19 20:28:49 -0400 |
commit | 46e7b8d8d53bcde075dca6da3a3816a663073499 (patch) | |
tree | f7f76547537f17cabb98850efabdc5619a92edb1 /net/dsa/slave.c | |
parent | 9f4ab6ec7ee3b4971231d0b9078062f99decfa13 (diff) |
net: dsa: kill circular reference with slave priv
The dsa_slave_priv structure does not need a pointer to its net_device.
Kill it.
Signed-off-by: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dsa/slave.c')
-rw-r--r-- | net/dsa/slave.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/net/dsa/slave.c b/net/dsa/slave.c index 2dae0d064359..3b6750f5e68b 100644 --- a/net/dsa/slave.c +++ b/net/dsa/slave.c | |||
@@ -673,10 +673,10 @@ static void dsa_slave_get_ethtool_stats(struct net_device *dev, | |||
673 | struct dsa_slave_priv *p = netdev_priv(dev); | 673 | struct dsa_slave_priv *p = netdev_priv(dev); |
674 | struct dsa_switch *ds = p->parent; | 674 | struct dsa_switch *ds = p->parent; |
675 | 675 | ||
676 | data[0] = p->dev->stats.tx_packets; | 676 | data[0] = dev->stats.tx_packets; |
677 | data[1] = p->dev->stats.tx_bytes; | 677 | data[1] = dev->stats.tx_bytes; |
678 | data[2] = p->dev->stats.rx_packets; | 678 | data[2] = dev->stats.rx_packets; |
679 | data[3] = p->dev->stats.rx_bytes; | 679 | data[3] = dev->stats.rx_bytes; |
680 | if (ds->drv->get_ethtool_stats != NULL) | 680 | if (ds->drv->get_ethtool_stats != NULL) |
681 | ds->drv->get_ethtool_stats(ds, p->port, data + 4); | 681 | ds->drv->get_ethtool_stats(ds, p->port, data + 4); |
682 | } | 682 | } |
@@ -1063,7 +1063,6 @@ int dsa_slave_create(struct dsa_switch *ds, struct device *parent, | |||
1063 | slave_dev->vlan_features = master->vlan_features; | 1063 | slave_dev->vlan_features = master->vlan_features; |
1064 | 1064 | ||
1065 | p = netdev_priv(slave_dev); | 1065 | p = netdev_priv(slave_dev); |
1066 | p->dev = slave_dev; | ||
1067 | p->parent = ds; | 1066 | p->parent = ds; |
1068 | p->port = port; | 1067 | p->port = port; |
1069 | 1068 | ||