]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
leds: flash: Use fwnode_get_next_child_node() instead
authorSakari Ailus <sakari.ailus@linux.intel.com>
Wed, 24 Sep 2025 07:46:00 +0000 (10:46 +0300)
committerLee Jones <lee@kernel.org>
Tue, 21 Oct 2025 09:46:22 +0000 (10:46 +0100)
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>
drivers/leds/flash/leds-rt4505.c
drivers/leds/flash/leds-rt8515.c
drivers/leds/flash/leds-sgm3140.c
drivers/leds/flash/leds-tps6131x.c

index f16358b8dfc19a2f2edace0e39c90c2288d1bec0..18fd5b7e528f4306eb4bc55cd853a8a0ec2d9743 100644 (file)
@@ -365,7 +365,7 @@ static int rt4505_probe(struct i2c_client *client)
                return ret;
        }
 
-       child = fwnode_get_next_available_child_node(client->dev.fwnode, NULL);
+       child = device_get_next_child_node(&client->dev, NULL);
        if (!child) {
                dev_err(priv->dev, "Failed to get child node\n");
                return -EINVAL;
index 6af0d2c7fc56e3d00f95663a4d50ce2f50e77aee..f6b439674c036b2c75cd8123295bb36003ca5730 100644 (file)
@@ -304,7 +304,7 @@ static int rt8515_probe(struct platform_device *pdev)
                return dev_err_probe(dev, PTR_ERR(rt->enable_torch),
                                     "cannot get ENT (enable torch) GPIO\n");
 
-       child = fwnode_get_next_available_child_node(dev->fwnode, NULL);
+       child = device_get_next_child_node(dev, NULL);
        if (!child) {
                dev_err(dev,
                        "No fwnode child node found for connected LED.\n");
index 3e83200675f266063dd7ea2c7c64a30e46487127..dc6840357370857d893c60cc3a385a4bbe189065 100644 (file)
@@ -214,8 +214,7 @@ static int sgm3140_probe(struct platform_device *pdev)
                return dev_err_probe(&pdev->dev, ret,
                                     "Failed to request regulator\n");
 
-       child_node = fwnode_get_next_available_child_node(pdev->dev.fwnode,
-                                                         NULL);
+       child_node = device_get_next_child_node(&pdev->dev, NULL);
        if (!child_node) {
                dev_err(&pdev->dev,
                        "No fwnode child node found for connected LED.\n");
index 6f4d4fd553610d082687c57266bc0d4f797259d6..f0f1f2b77d5a935cdca2f280b0197fb26bbf4bb4 100644 (file)
@@ -544,7 +544,7 @@ static int tps6131x_parse_node(struct tps6131x *tps6131x)
 
        tps6131x->valley_current_limit = device_property_read_bool(dev, "ti,valley-current-limit");
 
-       tps6131x->led_node = fwnode_get_next_available_child_node(dev->fwnode, NULL);
+       tps6131x->led_node = device_get_next_child_node(dev, NULL);
        if (!tps6131x->led_node) {
                dev_err(dev, "Missing LED node\n");
                return -EINVAL;