diff options
| author | Wolfram Sang <wsa+renesas@sang-engineering.com> | 2025-09-25 22:42:24 +0200 |
|---|---|---|
| committer | Wolfram Sang <wsa+renesas@sang-engineering.com> | 2025-09-25 22:42:24 +0200 |
| commit | 54d6a978bb2bb78a781bc849608c5b4f0748985b (patch) | |
| tree | 390bb7f4ca9e5596ef1f54c2f0132b35dcdcc032 /include/linux | |
| parent | 958e55f90a01451de77e22063d37b60388219b96 (diff) | |
| parent | d32bb69523b86c85fc91d4c8a6d8313639ac1c1c (diff) | |
Merge branch 'i2c/immutable/scoped_fwnode_child' into i2c/for-mergewindow
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/property.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/property.h b/include/linux/property.h index 82f0cb3abd1e..862e208133f3 100644 --- a/include/linux/property.h +++ b/include/linux/property.h @@ -176,6 +176,16 @@ struct fwnode_handle *fwnode_get_next_available_child_node( for (child = fwnode_get_next_available_child_node(fwnode, NULL); child;\ child = fwnode_get_next_available_child_node(fwnode, child)) +#define fwnode_for_each_child_node_scoped(fwnode, child) \ + for (struct fwnode_handle *child __free(fwnode_handle) = \ + fwnode_get_next_child_node(fwnode, NULL); \ + child; child = fwnode_get_next_child_node(fwnode, child)) + +#define fwnode_for_each_available_child_node_scoped(fwnode, child) \ + for (struct fwnode_handle *child __free(fwnode_handle) = \ + fwnode_get_next_available_child_node(fwnode, NULL); \ + child; child = fwnode_get_next_available_child_node(fwnode, child)) + struct fwnode_handle *device_get_next_child_node(const struct device *dev, struct fwnode_handle *child); |
