diff options
author | 2025-02-05 17:09:47 +0100 | |
---|---|---|
committer | 2025-02-06 17:33:31 -0800 | |
commit | ec7309525a37b3f34c4efa85fc2ecaa65f41830e (patch) | |
tree | 6be379c62926f064d8f939bc82fe2148546f4a39 | |
parent | net: pcs: rzn1-miic: fill in PCS supported_interfaces (diff) | |
download | wireguard-linux-ec7309525a37b3f34c4efa85fc2ecaa65f41830e.tar.xz wireguard-linux-ec7309525a37b3f34c4efa85fc2ecaa65f41830e.zip |
net: pcs: rzn1-miic: Convert to for_each_available_child_of_node() helper
Simplify miic_parse_dt() by using the for_each_available_child_of_node()
helper instead of manually skipping unavailable child nodes.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/3e394d4cf8204bcf17b184bfda474085aa8ed0dd.1738771631.git.geert+renesas@glider.be
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-rw-r--r-- | drivers/net/pcs/pcs-rzn1-miic.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/net/pcs/pcs-rzn1-miic.c b/drivers/net/pcs/pcs-rzn1-miic.c index 11a96459a425..a808ac7375f5 100644 --- a/drivers/net/pcs/pcs-rzn1-miic.c +++ b/drivers/net/pcs/pcs-rzn1-miic.c @@ -464,13 +464,10 @@ static int miic_parse_dt(struct device *dev, u32 *mode_cfg) if (of_property_read_u32(np, "renesas,miic-switch-portin", &conf) == 0) dt_val[0] = conf; - for_each_child_of_node(np, conv) { + for_each_available_child_of_node(np, conv) { if (of_property_read_u32(conv, "reg", &port)) continue; - if (!of_device_is_available(conv)) - continue; - if (of_property_read_u32(conv, "renesas,miic-input", &conf) == 0) dt_val[port] = conf; } |