Skip to content

Commit 98888f6

Browse files
Sakari Ailuslag-linaro
authored andcommitted
leds: flash: Use fwnode_get_next_child_node() instead
fwnode_get_next_child_node() is now the same as fwnode_get_next_available_child_node() on all backends (OF, ACPI and swnode). In order to remove the available variants, switch the uses to non-available variants (device_get_next_child_node() in this case). 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 3b6eaa3 commit 98888f6

4 files changed

Lines changed: 4 additions & 5 deletions

File tree

drivers/leds/flash/leds-rt4505.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ static int rt4505_probe(struct i2c_client *client)
365365
return ret;
366366
}
367367

368-
child = fwnode_get_next_available_child_node(client->dev.fwnode, NULL);
368+
child = device_get_next_child_node(&client->dev, NULL);
369369
if (!child) {
370370
dev_err(priv->dev, "Failed to get child node\n");
371371
return -EINVAL;

drivers/leds/flash/leds-rt8515.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ static int rt8515_probe(struct platform_device *pdev)
304304
return dev_err_probe(dev, PTR_ERR(rt->enable_torch),
305305
"cannot get ENT (enable torch) GPIO\n");
306306

307-
child = fwnode_get_next_available_child_node(dev->fwnode, NULL);
307+
child = device_get_next_child_node(dev, NULL);
308308
if (!child) {
309309
dev_err(dev,
310310
"No fwnode child node found for connected LED.\n");

drivers/leds/flash/leds-sgm3140.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,8 +214,7 @@ static int sgm3140_probe(struct platform_device *pdev)
214214
return dev_err_probe(&pdev->dev, ret,
215215
"Failed to request regulator\n");
216216

217-
child_node = fwnode_get_next_available_child_node(pdev->dev.fwnode,
218-
NULL);
217+
child_node = device_get_next_child_node(&pdev->dev, NULL);
219218
if (!child_node) {
220219
dev_err(&pdev->dev,
221220
"No fwnode child node found for connected LED.\n");

drivers/leds/flash/leds-tps6131x.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,7 @@ static int tps6131x_parse_node(struct tps6131x *tps6131x)
544544

545545
tps6131x->valley_current_limit = device_property_read_bool(dev, "ti,valley-current-limit");
546546

547-
tps6131x->led_node = fwnode_get_next_available_child_node(dev->fwnode, NULL);
547+
tps6131x->led_node = device_get_next_child_node(dev, NULL);
548548
if (!tps6131x->led_node) {
549549
dev_err(dev, "Missing LED node\n");
550550
return -EINVAL;

0 commit comments

Comments
 (0)