Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Bartosz Golaszewski and committed by
Rob Herring
ad8ee969 aaef9cdc

+3 -3
+3 -3
include/linux/of.h
··· 362 362 int index); 363 363 extern u64 of_get_cpu_hwid(struct device_node *cpun, unsigned int thread); 364 364 365 - #define for_each_property_of_node(dn, pp) \ 366 - for (pp = dn->properties; pp != NULL; pp = pp->next) 367 - 368 365 extern int of_n_addr_cells(struct device_node *np); 369 366 extern int of_n_size_cells(struct device_node *np); 370 367 extern const struct of_device_id *of_match_node( ··· 888 891 return p1->length == p2->length && 889 892 !memcmp(p1->value, p2->value, (size_t)p1->length); 890 893 } 894 + 895 + #define for_each_property_of_node(dn, pp) \ 896 + for (pp = dn->properties; pp != NULL; pp = pp->next) 891 897 892 898 #if defined(CONFIG_OF) && defined(CONFIG_NUMA) 893 899 extern int of_node_to_nid(struct device_node *np);