Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit aba3dfff authored by Stephen Warren's avatar Stephen Warren Committed by Grant Likely
Browse files

dt: add empty for_each_child_of_node, of_find_property



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: default avatarStephen Warren <swarren@nvidia.com>
Signed-off-by: default avatarGrant Likely <grant.likely@secretlab.ca>
parent 987bfad6
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -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)