net: dsa: qca8k: fall back to ethernet-ports node name for LEDs

The device tree binding allows both "ports" and "ethernet-ports" as
the container node name.  Try "ethernet-ports" when "ports" is absent
so that newer DTBs with the preferred name work.

This matches the handling already present in qca8k-8xxx.c

Assisted-by: opencode:big-pickle
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Link: https://patch.msgid.link/20260630015137.1591152-1-rosenp@gmail.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
This commit is contained in:
Rosen Penev
2026-07-02 11:48:25 +02:00
committed by Paolo Abeni
parent 49c5ad3cd5
commit b8ea7da314
+3
View File
@@ -457,6 +457,9 @@ qca8k_setup_led_ctrl(struct qca8k_priv *priv)
int ret;
ports = device_get_named_child_node(priv->dev, "ports");
if (!ports)
ports = device_get_named_child_node(priv->dev, "ethernet-ports");
if (!ports) {
dev_info(priv->dev, "No ports node specified in device tree!");
return 0;