Skip to content

Commit

Permalink
net: dsa: qca8k: add ethernet-ports fallback to setup_mdio_bus
Browse files Browse the repository at this point in the history
Dsa now also supports ethernet-ports. Add this new binding as a fallback
if the ports node can't be found.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Ansuel Smith authored and David S. Miller committed May 14, 2021
1 parent 95ffeaf commit 1ee0591
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/net/dsa/qca8k.c
Original file line number Diff line number Diff line change
Expand Up @@ -718,6 +718,9 @@ qca8k_setup_mdio_bus(struct qca8k_priv *priv)
int err;

ports = of_get_child_by_name(priv->dev->of_node, "ports");
if (!ports)
ports = of_get_child_by_name(priv->dev->of_node, "ethernet-ports");

if (!ports)
return -EINVAL;

Expand Down

0 comments on commit 1ee0591

Please sign in to comment.