Commit 85e05d26 authored by Kurt Kanzenbach's avatar Kurt Kanzenbach Committed by David S. Miller

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's avatarKurt Kanzenbach <kurt@linutronix.de>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 5a18bb14
...@@ -727,8 +727,12 @@ static int dsa_switch_parse_ports_of(struct dsa_switch *ds, ...@@ -727,8 +727,12 @@ static int dsa_switch_parse_ports_of(struct dsa_switch *ds,
ports = of_get_child_by_name(dn, "ports"); ports = of_get_child_by_name(dn, "ports");
if (!ports) { if (!ports) {
dev_err(ds->dev, "no ports child node found\n"); /* The second possibility is "ethernet-ports" */
return -EINVAL; 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) { for_each_available_child_of_node(ports, port) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment