Commit 10cc4876 authored by Javier Carrasco's avatar Javier Carrasco Committed by Lee Jones
Browse files

leds: is31fl319x: Use device_for_each_child_node_scoped() to access child nodes



The iterated nodes are direct children of the device node, and the
`device_for_each_child_node()` macro accounts for child node
availability.

`fwnode_for_each_available_child_node()` is meant to access the child
nodes of an fwnode, and therefore not direct child nodes of the device
node.

In this case, the child nodes are not required outside the loop, and
the scoped version of the macro can be used to remove the repetitive
`goto put` pattern.

Use `device_for_each_child_node_scoped_scoped()` to indicate device's
direct child nodes.

Signed-off-by: default avatarJavier Carrasco <javier.carrasco.cruz@gmail.com>
Reviewed-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
Link: https://lore.kernel.org/r/20240721-device_for_each_child_node-available-v2-4-f33748fd8b2d@gmail.com


Signed-off-by: default avatarLee Jones <lee@kernel.org>
parent ffbf1fcb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment