[PATCH v2 13/16] leds: Use fwnode_for_each_child_node() instead

Sakari Ailus
2025-09-24T07:46:31Z

fwnode_for_each_child_node() is now the same as
fwnode_for_each_available_child_node() on all backends (OF, ACPI and
swnode). In order to remove the available variants, switch the uses to
non-available variants.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
drivers/leds/leds-max5970.c | 2 +-
drivers/leds/leds-max77705.c | 2 +-
drivers/leds/rgb/leds-ktd202x.c | 4 ++--
drivers/leds/rgb/leds-ncp5623.c | 2 +-
4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/leds/leds-max5970.c b/drivers/leds/leds-max5970.c
index 285074c53b23..a1e91a06249c 100644
--- a/drivers/leds/leds-max5970.c
+++ b/drivers/leds/leds-max5970.c
@@ -60,7 +60,7 @@ static int max5970_led_probe(struct platform_device *pdev)
if (!led_node)
return -ENODEV;

- fwnode_for_each_available_child_node(led_node, child) {
+ fwnode_for_each_child_node(led_node, child) {
u32 reg;

if (fwnode_property_read_u32(child, "reg", &reg))
diff --git a/drivers/leds/leds-max77705.c b/drivers/leds/leds-max77705.c
index b7403b3fcf5e..1e2054c1bf80 100644
--- a/drivers/leds/leds-max77705.c
+++ b/drivers/leds/leds-max77705.c
@@ -191,7 +191,7 @@ static int max77705_add_led(struct device *dev, struct regmap *regmap, struct fw
cdev->brightness_set_blocking = max77705_led_brightness_set_multi;
cdev->blink_set = max77705_rgb_blink;

- fwnode_for_each_available_child_node(np, child) {
+ fwnode_for_each_child_node(np, child) {
ret = max77705_parse_subled(dev, child, &info[i]);
if (ret < 0)
return ret;
diff --git a/drivers/leds/rgb/leds-ktd202x.c b/drivers/leds/rgb/leds-ktd202x.c
index 04e62faa3a00..e4f0f25a5e45 100644
--- a/drivers/leds/rgb/leds-ktd202x.c
+++ b/drivers/leds/rgb/leds-ktd202x.c
@@ -391,7 +391,7 @@ static int ktd202x_setup_led_rgb(struct ktd202x *chip, struct fwnode_handle *fwn
int i = 0;

num_channels = 0;
- fwnode_for_each_available_child_node(fwnode, child)
+ fwnode_for_each_child_node(fwnode, child)
num_channels++;

if (!num_channels || num_channels > chip->num_leds)
@@ -401,7 +401,7 @@ static int ktd202x_setup_led_rgb(struct ktd202x *chip, struct fwnode_handle *fwn
if (!info)
return -ENOMEM;

- fwnode_for_each_available_child_node(fwnode, child) {
+ fwnode_for_each_child_node(fwnode, child) {
u32 mono_color;
u32 reg;
int ret;
diff --git a/drivers/leds/rgb/leds-ncp5623.c b/drivers/leds/rgb/leds-ncp5623.c
index 7c7d44623a9e..85d6be6fff2b 100644
--- a/drivers/leds/rgb/leds-ncp5623.c
+++ b/drivers/leds/rgb/leds-ncp5623.c
@@ -180,7 +180,7 @@ static int ncp5623_probe(struct i2c_client *client)
goto release_mc_node;
}

- fwnode_for_each_available_child_node(mc_node, led_node) {
+ fwnode_for_each_child_node(mc_node, led_node) {
ret = fwnode_property_read_u32(led_node, "color", &color_index);
if (ret)
goto release_led_node;
--
2.47.3