Commit 15074a36 authored by Vladimir Oltean's avatar Vladimir Oltean Committed by Jakub Kicinski

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: default avatarVladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 44fdd2ed
...@@ -885,6 +885,8 @@ static int sja1105_parse_dt(struct sja1105_private *priv, ...@@ -885,6 +885,8 @@ static int sja1105_parse_dt(struct sja1105_private *priv,
int rc; int rc;
ports_node = of_get_child_by_name(switch_node, "ports"); 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) { if (!ports_node) {
dev_err(dev, "Incorrect bindings: absent \"ports\" node\n"); dev_err(dev, "Incorrect bindings: absent \"ports\" node\n");
return -ENODEV; return -ENODEV;
......
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