提交 3a1e362e 编写于 作者: B Ben Dooks 提交者: Grant Likely

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: NBen Dooks <ben-linux@fluff.org>
Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
上级 aba3dfff
......@@ -242,6 +242,7 @@ extern void of_attach_node(struct device_node *);
extern void of_detach_node(struct device_node *);
#endif
#define of_match_ptr(_ptr) (_ptr)
#else /* CONFIG_OF */
static inline bool of_have_populated_dt(void)
......@@ -280,6 +281,7 @@ static inline const void *of_get_property(const struct device_node *node,
return NULL;
}
#define of_match_ptr(_ptr) NULL
#endif /* CONFIG_OF */
static inline int of_property_read_u32(const struct device_node *np,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册