From: Vladimir Oltean Date: Sun, 30 May 2021 22:59:32 +0000 (+0300) Subject: net: dsa: sja1105: be compatible with "ethernet-ports" OF node name X-Git-Tag: io_uring-5.14-2021-07-09~10^2~405^2~7 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=15074a361fee151ee4207d20020a2de178cf490f;p=linux-2.6-block.git net: dsa: sja1105: be compatible with "ethernet-ports" OF node name Since commit f2f3e09396be ("net: dsa: sja1105: be compatible with "ethernet-ports" OF node name"), DSA supports the "ethernet-ports" name for the container node of the ports, but the sja1105 driver doesn't, because it handles some device tree parsing of its own. Add the second node name as a fallback. Signed-off-by: Vladimir Oltean Reviewed-by: Florian Fainelli Signed-off-by: Jakub Kicinski --- diff --git a/drivers/net/dsa/sja1105/sja1105_main.c b/drivers/net/dsa/sja1105/sja1105_main.c index 2080f36ff25b..4c776bd7ce25 100644 --- a/drivers/net/dsa/sja1105/sja1105_main.c +++ b/drivers/net/dsa/sja1105/sja1105_main.c @@ -885,6 +885,8 @@ static int sja1105_parse_dt(struct sja1105_private *priv, int rc; ports_node = of_get_child_by_name(switch_node, "ports"); + if (!ports_node) + ports_node = of_get_child_by_name(switch_node, "ethernet-ports"); if (!ports_node) { dev_err(dev, "Incorrect bindings: absent \"ports\" node\n"); return -ENODEV;