Skip to content

Commit

Permalink
dt: Add empty of_match_node() macro
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Nicolas Ferre authored and Grant Likely committed Oct 24, 2011
1 parent 36a0904 commit 5762c20
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions include/linux/of.h
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,7 @@ static inline struct device_node *of_parse_phandle(struct device_node *np,
}

#define of_match_ptr(_ptr) NULL
#define of_match_node(_matches, _node) NULL
#endif /* CONFIG_OF */

static inline int of_property_read_u32(const struct device_node *np,
Expand Down

0 comments on commit 5762c20

Please sign in to comment.