Skip to content

Commit 5762c20

Browse files
Nicolas Ferreglikely
authored andcommitted
dt: Add empty of_match_node() macro
Add an empty macro for of_match_node() that will save some '#ifdef CONFIG_OF' for non-dt builds. I have chosen to use a macro instead of a function to be able to avoid defining the first parameter. In fact, this "struct of_device_id *" first parameter is usualy not defined as well on non-dt builds. Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Acked-by: Grant Likely <grant.likely@secretlab.ca>
1 parent 36a0904 commit 5762c20

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

include/linux/of.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,7 @@ static inline struct device_node *of_parse_phandle(struct device_node *np,
303303
}
304304

305305
#define of_match_ptr(_ptr) NULL
306+
#define of_match_node(_matches, _node) NULL
306307
#endif /* CONFIG_OF */
307308

308309
static inline int of_property_read_u32(const struct device_node *np,

0 commit comments

Comments
 (0)