diff options
author | Bartosz Golaszewski <bartosz.golaszewski@linaro.org> | 2024-03-03 11:48:53 +0100 |
---|---|---|
committer | Rob Herring <robh@kernel.org> | 2024-03-04 15:03:59 -0600 |
commit | ad8ee969d7e34dd310a618d798cc6d8fe4f04464 (patch) | |
tree | c01ed56bac4beafd0fa08ed978b602f6ddcfa490 /include/linux/of.h | |
parent | aaef9cdc4bdcf45db729a4ce7ebf3fda3336e092 (diff) |
of: make for_each_property_of_node() available to to !OF
for_each_property_of_node() is a macro and so doesn't have a stub inline
function for !OF. Move it out of the relevant #ifdef to make it available
to all users.
Fixes: 611cad720148 ("dt: add of_alias_scan and of_alias_get_id")
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Link: https://lore.kernel.org/r/20240303104853.31511-1-brgl@bgdev.pl
Signed-off-by: Rob Herring <robh@kernel.org>
Diffstat (limited to 'include/linux/of.h')
-rw-r--r-- | include/linux/of.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/of.h b/include/linux/of.h index 6a9ddf20e79a..a3e8e429ad7f 100644 --- a/include/linux/of.h +++ b/include/linux/of.h @@ -362,9 +362,6 @@ extern struct device_node *of_get_cpu_state_node(struct device_node *cpu_node, int index); extern u64 of_get_cpu_hwid(struct device_node *cpun, unsigned int thread); -#define for_each_property_of_node(dn, pp) \ - for (pp = dn->properties; pp != NULL; pp = pp->next) - extern int of_n_addr_cells(struct device_node *np); extern int of_n_size_cells(struct device_node *np); extern const struct of_device_id *of_match_node( @@ -892,6 +889,9 @@ static inline int of_prop_val_eq(struct property *p1, struct property *p2) !memcmp(p1->value, p2->value, (size_t)p1->length); } +#define for_each_property_of_node(dn, pp) \ + for (pp = dn->properties; pp != NULL; pp = pp->next) + #if defined(CONFIG_OF) && defined(CONFIG_NUMA) extern int of_node_to_nid(struct device_node *np); #else |