dt: add empty dt helpers for non-dt build
Add empty of_device_is_compatible() and of_parse_phandle() for non-dt
builds to work.
Change-Id: Id91ac5e6f628bb9f7dea5ef57c8727c3f10ee6ce
Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
[mbohan: resolve merge conflict in include/linux/of.h]
Signed-off-by: Michael Bohan <mbohan@codeaurora.org>
diff --git a/include/linux/of.h b/include/linux/of.h
index b904f7e..452ed98 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -249,6 +249,12 @@
#define for_each_child_of_node(parent, child) \
while (0)
+static inline int of_device_is_compatible(const struct device_node *device,
+ const char *name)
+{
+ return 0;
+}
+
static inline struct property *of_find_property(const struct device_node *np,
const char *name,
int *lenp)
@@ -288,6 +294,13 @@
return NULL;
}
+static inline struct device_node *of_parse_phandle(struct device_node *np,
+ const char *phandle_name,
+ int index)
+{
+ return NULL;
+}
+
#endif /* CONFIG_OF */
static inline int of_property_read_u32(const struct device_node *np,