Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

leds: Use fwnode_for_each_child_node() instead

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>

authored by

Sakari Ailus and committed by
Lee Jones
3b6eaa3d e39d87fd

+5 -5
+1 -1
drivers/leds/leds-max5970.c
··· 60 60 if (!led_node) 61 61 return -ENODEV; 62 62 63 - fwnode_for_each_available_child_node(led_node, child) { 63 + fwnode_for_each_child_node(led_node, child) { 64 64 u32 reg; 65 65 66 66 if (fwnode_property_read_u32(child, "reg", &reg))
+1 -1
drivers/leds/leds-max77705.c
··· 191 191 cdev->brightness_set_blocking = max77705_led_brightness_set_multi; 192 192 cdev->blink_set = max77705_rgb_blink; 193 193 194 - fwnode_for_each_available_child_node(np, child) { 194 + fwnode_for_each_child_node(np, child) { 195 195 ret = max77705_parse_subled(dev, child, &info[i]); 196 196 if (ret < 0) 197 197 return ret;
+2 -2
drivers/leds/rgb/leds-ktd202x.c
··· 391 391 int i = 0; 392 392 393 393 num_channels = 0; 394 - fwnode_for_each_available_child_node(fwnode, child) 394 + fwnode_for_each_child_node(fwnode, child) 395 395 num_channels++; 396 396 397 397 if (!num_channels || num_channels > chip->num_leds) ··· 401 401 if (!info) 402 402 return -ENOMEM; 403 403 404 - fwnode_for_each_available_child_node(fwnode, child) { 404 + fwnode_for_each_child_node(fwnode, child) { 405 405 u32 mono_color; 406 406 u32 reg; 407 407 int ret;
+1 -1
drivers/leds/rgb/leds-ncp5623.c
··· 180 180 goto release_mc_node; 181 181 } 182 182 183 - fwnode_for_each_available_child_node(mc_node, led_node) { 183 + fwnode_for_each_child_node(mc_node, led_node) { 184 184 ret = fwnode_property_read_u32(led_node, "color", &color_index); 185 185 if (ret) 186 186 goto release_led_node;