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 <markus.stockhausen@gmx.de>
Link: https://github.com/openwrt/openwrt/pull/22830
Signed-off-by: Robert Marko <robimarko@gmail.com>
This commit is contained in:
Markus Stockhausen 2026-04-07 18:22:08 +02:00 committed by Robert Marko
parent 084da38a2e
commit e27ad8b4f6

View File

@ -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);