Skip to content

Commit 3b6eaa3

Browse files
Sakari Ailuslag-linaro
authored andcommitted
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>
1 parent e39d87f commit 3b6eaa3

4 files changed

Lines changed: 5 additions & 5 deletions

File tree

drivers/leds/leds-max5970.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ static int max5970_led_probe(struct platform_device *pdev)
6060
if (!led_node)
6161
return -ENODEV;
6262

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

6666
if (fwnode_property_read_u32(child, "reg", &reg))

drivers/leds/leds-max77705.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ static int max77705_add_led(struct device *dev, struct regmap *regmap, struct fw
191191
cdev->brightness_set_blocking = max77705_led_brightness_set_multi;
192192
cdev->blink_set = max77705_rgb_blink;
193193

194-
fwnode_for_each_available_child_node(np, child) {
194+
fwnode_for_each_child_node(np, child) {
195195
ret = max77705_parse_subled(dev, child, &info[i]);
196196
if (ret < 0)
197197
return ret;

drivers/leds/rgb/leds-ktd202x.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ static int ktd202x_setup_led_rgb(struct ktd202x *chip, struct fwnode_handle *fwn
391391
int i = 0;
392392

393393
num_channels = 0;
394-
fwnode_for_each_available_child_node(fwnode, child)
394+
fwnode_for_each_child_node(fwnode, child)
395395
num_channels++;
396396

397397
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
401401
if (!info)
402402
return -ENOMEM;
403403

404-
fwnode_for_each_available_child_node(fwnode, child) {
404+
fwnode_for_each_child_node(fwnode, child) {
405405
u32 mono_color;
406406
u32 reg;
407407
int ret;

drivers/leds/rgb/leds-ncp5623.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ static int ncp5623_probe(struct i2c_client *client)
180180
goto release_mc_node;
181181
}
182182

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

0 commit comments

Comments
 (0)