diff options
author | Andrew Lunn <andrew@lunn.ch> | 2016-06-04 21:16:57 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-06-04 14:29:53 -0700 |
commit | c8b098086b4c744084350d2757a637ad756adf34 (patch) | |
tree | 0777d99335eff8adf732bd1cb574926b87f9d6c2 /net/dsa/slave.c | |
parent | 149cafd790573294752787f5ce1dc0f99e4088d3 (diff) | |
download | op-kernel-dev-c8b098086b4c744084350d2757a637ad756adf34.zip op-kernel-dev-c8b098086b4c744084350d2757a637ad756adf34.tar.gz |
net: dsa: Add a ports structure and use it in the switch structure
There are going to be more per-port members added to the switch
structure. So add a port structure and move the netdev into it.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-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 | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/dsa/slave.c b/net/dsa/slave.c index f640a48..169abac 100644 --- a/net/dsa/slave.c +++ b/net/dsa/slave.c @@ -1183,12 +1183,12 @@ int dsa_slave_create(struct dsa_switch *ds, struct device *parent, p->old_link = -1; p->old_duplex = -1; - ds->ports[port] = slave_dev; + ds->ports[port].netdev = slave_dev; ret = register_netdev(slave_dev); if (ret) { netdev_err(master, "error %d registering interface %s\n", ret, slave_dev->name); - ds->ports[port] = NULL; + ds->ports[port].netdev = NULL; free_netdev(slave_dev); return ret; } |