Skip to content

Commit ad8ee96

Browse files
Bartosz Golaszewskirobherring
authored andcommitted
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: 611cad7 ("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>
1 parent aaef9cd commit ad8ee96

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

include/linux/of.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -362,9 +362,6 @@ extern struct device_node *of_get_cpu_state_node(struct device_node *cpu_node,
362362
int index);
363363
extern u64 of_get_cpu_hwid(struct device_node *cpun, unsigned int thread);
364364

365-
#define for_each_property_of_node(dn, pp) \
366-
for (pp = dn->properties; pp != NULL; pp = pp->next)
367-
368365
extern int of_n_addr_cells(struct device_node *np);
369366
extern int of_n_size_cells(struct device_node *np);
370367
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)
892889
!memcmp(p1->value, p2->value, (size_t)p1->length);
893890
}
894891

892+
#define for_each_property_of_node(dn, pp) \
893+
for (pp = dn->properties; pp != NULL; pp = pp->next)
894+
895895
#if defined(CONFIG_OF) && defined(CONFIG_NUMA)
896896
extern int of_node_to_nid(struct device_node *np);
897897
#else

0 commit comments

Comments
 (0)