From b8b35d40b4e3197dc5aa80fab649b576e2706c14 Mon Sep 17 00:00:00 2001 From: Ben Dooks Date: Wed, 3 Aug 2011 10:11:42 +0100 Subject: 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 Signed-off-by: Grant Likely (cherry picked from commit 3a1e362e3f3cd571b3974b8d44b8e358ec7a098c) Change-Id: Ib0365629efb6f203f8d87b487f66f99417e71bb3 Signed-off-by: Laxman Dewangan Reviewed-on: http://git-master/r/105929 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit --- include/linux/of.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/linux') diff --git a/include/linux/of.h b/include/linux/of.h index 9180dc5cb00b..c4b5b52a7515 100644 --- a/include/linux/of.h +++ b/include/linux/of.h @@ -235,6 +235,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) @@ -263,6 +264,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, -- cgit v1.2.3