diff options
author | Kurt Kanzenbach <kurt@linutronix.de> | 2020-07-20 15:49:39 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-07-23 02:56:43 +0300 |
commit | 85e05d263ed2d50e3be86c73175effe780ec1d9a (patch) | |
tree | 4fdd3c747a9f2b6db6c54d9afdc058cd16267599 /net/dsa | |
parent | 5a18bb14c0f7ccd2c004ea2ca5ea106ec38675f8 (diff) | |
download | linux-85e05d263ed2d50e3be86c73175effe780ec1d9a.tar.xz |
net: dsa: of: Allow ethernet-ports as encapsulating node
Due to unified Ethernet Switch Device Tree Bindings allow for ethernet-ports as
encapsulating node as well.
Signed-off-by: Kurt Kanzenbach <kurt@linutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dsa')
-rw-r--r-- | net/dsa/dsa2.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/net/dsa/dsa2.c b/net/dsa/dsa2.c index e055efff390b..c0ffc7a2b65f 100644 --- a/net/dsa/dsa2.c +++ b/net/dsa/dsa2.c @@ -727,8 +727,12 @@ static int dsa_switch_parse_ports_of(struct dsa_switch *ds, ports = of_get_child_by_name(dn, "ports"); if (!ports) { - dev_err(ds->dev, "no ports child node found\n"); - return -EINVAL; + /* The second possibility is "ethernet-ports" */ + ports = of_get_child_by_name(dn, "ethernet-ports"); + if (!ports) { + dev_err(ds->dev, "no ports child node found\n"); + return -EINVAL; + } } for_each_available_child_of_node(ports, port) { |