Thread (3 messages) 3 messages, 2 authors, 2011-10-24

Re: [PATCH] dt: Add empty of_match_node() macro

From: Grant Likely <hidden>
Date: 2011-10-24 10:06:27
Also in: linux-arm-kernel, lkml

On Mon, Oct 24, 2011 at 11:53 AM, Nicolas Ferre [off-list ref] wrote:
quoted hunk ↗ jump to hunk
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 <redacted>
---
 include/linux/of.h |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/include/linux/of.h b/include/linux/of.h
index 736b747..92c40a1 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -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
Where possible, I prefer to code to be written in C, not PP.  :-)
static inline please.

g.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help