aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/of.h
diff options
context:
space:
mode:
authorBen Dooks <ben-linux@fluff.org>2011-08-03 05:11:42 -0400
committerGrant Likely <grant.likely@secretlab.ca>2011-09-29 21:31:48 -0400
commit3a1e362e3f3cd571b3974b8d44b8e358ec7a098c (patch)
tree89a3b59e55e8564dccd9fb0124b79038f39e3ae5 /include/linux/of.h
parentaba3dfff9a75eb272c4f47994f16eb5d548a5af1 (diff)
OF: Add of_match_ptr() macro
Add a macro of_match_ptr() that allows the .of_match_table entry in the driver structures to be assigned without having an #ifdef xxx NULL for the case that OF is not enabled Signed-off-by: Ben Dooks <ben-linux@fluff.org> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'include/linux/of.h')
-rw-r--r--include/linux/of.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/of.h b/include/linux/of.h
index 83a61f3b443c..53107b09cbdf 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -242,6 +242,7 @@ extern void of_attach_node(struct device_node *);
242extern void of_detach_node(struct device_node *); 242extern void of_detach_node(struct device_node *);
243#endif 243#endif
244 244
245#define of_match_ptr(_ptr) (_ptr)
245#else /* CONFIG_OF */ 246#else /* CONFIG_OF */
246 247
247static inline bool of_have_populated_dt(void) 248static inline bool of_have_populated_dt(void)
@@ -280,6 +281,7 @@ static inline const void *of_get_property(const struct device_node *node,
280 return NULL; 281 return NULL;
281} 282}
282 283
284#define of_match_ptr(_ptr) NULL
283#endif /* CONFIG_OF */ 285#endif /* CONFIG_OF */
284 286
285static inline int of_property_read_u32(const struct device_node *np, 287static inline int of_property_read_u32(const struct device_node *np,