]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
leds: Use fwnode_for_each_child_node() instead
authorSakari Ailus <sakari.ailus@linux.intel.com>
Wed, 24 Sep 2025 07:45:59 +0000 (10:45 +0300)
committerLee Jones <lee@kernel.org>
Tue, 21 Oct 2025 09:46:16 +0000 (10:46 +0100)
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>
Reviewed-by: Jonathan Cameron <jonathan.cameron@huawei.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Lee Jones <lee@kernel.org>
drivers/leds/leds-max5970.c
drivers/leds/leds-max77705.c
drivers/leds/rgb/leds-ktd202x.c
drivers/leds/rgb/leds-ncp5623.c

index 285074c53b2344e2d83fd79b34fd7f9a309895c7..a1e91a06249c5a8ba240f3327ba3710e161200ea 100644 (file)
@@ -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))
index b7403b3fcf5e72599d93065573d68061dc08577b..1e2054c1bf80bf6483f821813b20e763419e1f56 100644 (file)
@@ -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;
index 04e62faa3a00ed67961d61a3bcb315a18f5229a0..e4f0f25a5e4563825a334269141612056bef9134 100644 (file)
@@ -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;
index 7c7d44623a9e4fd5c251bc97e3ea5e3a7c3a2199..85d6be6fff2bcdceb46179f72edf19e51a331871 100644 (file)
@@ -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;