diff options
author | David S. Miller <davem@davemloft.net> | 2017-11-01 11:47:45 +0900 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-11-01 11:47:45 +0900 |
commit | a7b216b1e1cbbe7dceec2d69403bf249bb804abe (patch) | |
tree | aef0674ef932c1e00d293f695a998bf7604233db /net/dsa/slave.c | |
parent | 638f5b90d46016372a8e3e0a434f199cc5e12b8c (diff) | |
parent | 951259aa60180e2897d28b538bf68a3a213da471 (diff) |
Merge branch 'dsa-port-parsing'
Vivien Didelot says:
====================
net: dsa: add port parsing functions
This patchset adds port parsing functions called early in the new
bindings parsing stage, which regroup all the fetching of static data
available at the port level, including the port's type, name and CPU
master interface.
This simplifies the rest of the code which does not need to dig into
device tree or platform data again in order to check a port's type or
name.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dsa/slave.c')
-rw-r--r-- | net/dsa/slave.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/dsa/slave.c b/net/dsa/slave.c index 808e205227c3..48b954a76b0d 100644 --- a/net/dsa/slave.c +++ b/net/dsa/slave.c @@ -1142,11 +1142,12 @@ static void dsa_slave_notify(struct net_device *dev, unsigned long val) call_dsa_notifiers(val, dev, &rinfo.info); } -int dsa_slave_create(struct dsa_port *port, const char *name) +int dsa_slave_create(struct dsa_port *port) { struct dsa_port *cpu_dp = port->cpu_dp; struct net_device *master = cpu_dp->master; struct dsa_switch *ds = port->ds; + const char *name = port->name; struct net_device *slave_dev; struct dsa_slave_priv *p; int ret; |