From: Rosen Penev Date: Sun, 5 Jul 2026 23:06:23 +0000 (-0700) Subject: realtek: pcs: use device loop X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4d75424ae291413bd7e24f1cecec5630b9717296;p=thirdparty%2Fopenwrt.git realtek: pcs: use device loop Most of the file uses fwnode except for this section. Convert it. Signed-off-by: Rosen Penev Link: https://github.com/openwrt/openwrt/pull/24091 Signed-off-by: Jonas Jelonek --- diff --git a/target/linux/realtek/files-6.18/drivers/net/pcs/pcs-rtl-otto.c b/target/linux/realtek/files-6.18/drivers/net/pcs/pcs-rtl-otto.c index bc56e8f6de6..1e71c84e825 100644 --- a/target/linux/realtek/files-6.18/drivers/net/pcs/pcs-rtl-otto.c +++ b/target/linux/realtek/files-6.18/drivers/net/pcs/pcs-rtl-otto.c @@ -4155,8 +4155,8 @@ static int rtpcs_probe(struct platform_device *pdev) return ret; } - for_each_child_of_node_scoped(dev->of_node, child) { - ret = of_property_read_u32(child, "reg", &sds_id); + device_for_each_child_node_scoped(dev, child) { + ret = fwnode_property_read_u32(child, "reg", &sds_id); if (ret) return ret; @@ -4164,7 +4164,7 @@ static int rtpcs_probe(struct platform_device *pdev) return -EINVAL; sds = &ctrl->serdes[sds_id]; - sds->fwnode = fwnode_handle_get(of_fwnode_handle(child)); + sds->fwnode = fwnode_handle_get(child); ret = devm_add_action_or_reset(dev, rtpcs_sds_put_fwnode, sds); if (ret) return ret;