Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Kurt Kanzenbach and committed by
David S. Miller
85e05d26 5a18bb14

+6 -2
+6 -2
net/dsa/dsa2.c
··· 727 727 728 728 ports = of_get_child_by_name(dn, "ports"); 729 729 if (!ports) { 730 - dev_err(ds->dev, "no ports child node found\n"); 731 - return -EINVAL; 730 + /* The second possibility is "ethernet-ports" */ 731 + ports = of_get_child_by_name(dn, "ethernet-ports"); 732 + if (!ports) { 733 + dev_err(ds->dev, "no ports child node found\n"); 734 + return -EINVAL; 735 + } 732 736 } 733 737 734 738 for_each_available_child_of_node(ports, port) {