]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
realtek: mdio: drop dn attribute
authorMarkus Stockhausen <markus.stockhausen@gmx.de>
Tue, 7 Apr 2026 16:22:08 +0000 (18:22 +0200)
committerRobert Marko <robimarko@gmail.com>
Thu, 9 Apr 2026 08:46:37 +0000 (10:46 +0200)
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 <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/22830
Signed-off-by: Robert Marko <robimarko@gmail.com>
target/linux/realtek/files-6.18/drivers/net/mdio/mdio-realtek-otto.c

index 3c6f2b16c3175a57801b2c6b16d4d8bf9ef709ac..6677c38fa9f36bccd4e46e4b029dbc5783b96c87 100644 (file)
  */
 
 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);