Skip to content

Commit

Permalink
dt: add empty for_each_child_of_node, of_find_property
Browse files Browse the repository at this point in the history
The patch adds a couple empty functions for non-dt build, so that
drivers migrating to dt can save some '#ifdef CONFIG_OF'.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
  • Loading branch information
Stephen Warren authored and Grant Likely committed Sep 22, 2011
1 parent 987bfad commit aba3dff
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions include/linux/of.h
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,16 @@ static inline bool of_have_populated_dt(void)
return false;
}

#define for_each_child_of_node(parent, child) \
while (0)

static inline struct property *of_find_property(const struct device_node *np,
const char *name,
int *lenp)
{
return NULL;
}

static inline int of_property_read_u32_array(const struct device_node *np,
const char *propname,
u32 *out_values, size_t sz)
Expand Down

0 comments on commit aba3dff

Please sign in to comment.