On Thu, Nov 12, 2020 at 04:35:28PM +0100, Christian Eggers wrote: > The dsa.yaml device tree binding allows "ethernet-ports" (preferred) and > "ports". > > Signed-off-by: Christian Eggers <ceggers@xxxxxxx> > --- > drivers/net/dsa/microchip/ksz_common.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/dsa/microchip/ksz_common.c b/drivers/net/dsa/microchip/ksz_common.c > index 71cd1828e25d..a135fd5a9264 100644 > --- a/drivers/net/dsa/microchip/ksz_common.c > +++ b/drivers/net/dsa/microchip/ksz_common.c > @@ -427,7 +427,9 @@ int ksz_switch_register(struct ksz_device *dev, > ret = of_get_phy_mode(dev->dev->of_node, &interface); > if (ret == 0) > dev->compat_interface = interface; > - ports = of_get_child_by_name(dev->dev->of_node, "ports"); > + ports = of_get_child_by_name(dev->dev->of_node, "ethernet-ports"); > + if (!ports) > + ports = of_get_child_by_name(dev->dev->of_node, "ports"); Man, I didn't think there could be something as uninspired as naming the private structure of your driver "dev"... > if (ports) > for_each_available_child_of_node(ports, port) { > if (of_property_read_u32(port, "reg", > -- Either way: Reviewed-by: Vladimir Oltean <olteanv@xxxxxxxxx>