Commit 77b2b47
leds: as3645a: Use device_* to iterate over device child nodes
Drop the manual access to the fwnode of the device to iterate over its
child nodes. `device_for_each_child_node` macro provides direct access
to the child nodes, and given that the `child` variable is only required
within the loop, the scoped variant of the macro can be used.
Use the `device_for_each_child_node_scoped` macro to iterate over the
direct child nodes of the device.
Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Link: https://lore.kernel.org/r/20240820-device_child_node_access-v3-2-1ee09bdedb9e@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>1 parent 9557b43 commit 77b2b47
1 file changed
+3
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
478 | 478 | | |
479 | 479 | | |
480 | 480 | | |
481 | | - | |
482 | | - | |
| 481 | + | |
483 | 482 | | |
484 | 483 | | |
485 | | - | |
486 | 484 | | |
487 | 485 | | |
488 | | - | |
| 486 | + | |
489 | 487 | | |
490 | 488 | | |
491 | 489 | | |
| |||
686 | 684 | | |
687 | 685 | | |
688 | 686 | | |
689 | | - | |
| 687 | + | |
690 | 688 | | |
691 | 689 | | |
692 | 690 | | |
| |||
0 commit comments