From: Markus Stockhausen Date: Tue, 7 Apr 2026 16:22:08 +0000 (+0200) Subject: realtek: mdio: drop dn attribute X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e27ad8b4f6d4466cebd4009e82ab8ad6de082bbd;p=thirdparty%2Fopenwrt.git realtek: mdio: drop dn attribute The dn attribute was used to register the phys of the mdio bus individually. With the new multiple busses this is not needed any longer. Drop it. Signed-off-by: Markus Stockhausen Link: https://github.com/openwrt/openwrt/pull/22830 Signed-off-by: Robert Marko --- diff --git a/target/linux/realtek/files-6.18/drivers/net/mdio/mdio-realtek-otto.c b/target/linux/realtek/files-6.18/drivers/net/mdio/mdio-realtek-otto.c index 3c6f2b16c31..6677c38fa9f 100644 --- a/target/linux/realtek/files-6.18/drivers/net/mdio/mdio-realtek-otto.c +++ b/target/linux/realtek/files-6.18/drivers/net/mdio/mdio-realtek-otto.c @@ -177,7 +177,6 @@ */ struct rtmdio_port { - struct device_node *dn; int page; bool raw; u8 smi_addr; @@ -916,7 +915,6 @@ static int rtmdio_map_ports(struct device *dev) ctrl->port[addr].smi_bus = smi_bus; ctrl->port[addr].smi_addr = smi_addr; - ctrl->port[addr].dn = of_node_get(phy); __set_bit(addr, ctrl->valid_ports); } @@ -963,7 +961,7 @@ static int rtmdio_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct rtmdio_ctrl *ctrl; - int ret, pn; + int ret; ctrl = devm_kzalloc(dev, sizeof(*ctrl), GFP_KERNEL); if (!ctrl) @@ -980,11 +978,9 @@ static int rtmdio_probe(struct platform_device *pdev) return PTR_ERR(ctrl->map); ret = rtmdio_map_ports(dev); - if (ret) { - for_each_port(ctrl, pn) - of_node_put(ctrl->port[pn].dn); + if (ret) return ret; - } + rtmdio_setup_smi_topology(ctrl); ctrl->cfg->setup_ctrl(ctrl);