[PATCH net-next v2] net: sparx5/lan969x: populate netdev of_node
Robert Marko
robert.marko at sartura.hr
Mon Nov 10 04:42:53 PST 2025
Populate of_node for the port netdevs, to make the individual ports
of_nodes available in sysfs.
Signed-off-by: Robert Marko <robert.marko at sartura.hr>
---
Changes in v2:
* Per Daniels suggestion, set it directly in sparx5_create_port()
instead of doing it in the dedicated netdev registration function.
drivers/net/ethernet/microchip/sparx5/sparx5_main.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/ethernet/microchip/sparx5/sparx5_main.c b/drivers/net/ethernet/microchip/sparx5/sparx5_main.c
index 40b1bfc600a7..582145713cfd 100644
--- a/drivers/net/ethernet/microchip/sparx5/sparx5_main.c
+++ b/drivers/net/ethernet/microchip/sparx5/sparx5_main.c
@@ -395,6 +395,8 @@ static int sparx5_create_port(struct sparx5 *sparx5,
spx5_port->phylink = phylink;
+ spx5_port->ndev->dev.of_node = spx5_port->of_node;
+
return 0;
}
--
2.51.1
More information about the linux-arm-kernel
mailing list