]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
dt: add empty dt helpers for non-dt build
authorRajendra Nayak <rnayak@ti.com>
Mon, 10 Oct 2011 16:19:35 +0000 (21:49 +0530)
committerGrant Likely <grant.likely@secretlab.ca>
Thu, 13 Oct 2011 18:33:38 +0000 (12:33 -0600)
Add empty of_device_is_compatible() and of_parse_phandle() for non-dt
builds to work.

Signed-off-by: Rajendra Nayak <rnayak@ti.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
include/linux/of.h

index 1cc9930ba06ac73a60093398d5eb886be7b29bb3..736b7477beb2501d5f5e0c00dde6d13d2bc207f8 100644 (file)
@@ -255,6 +255,12 @@ static inline bool of_have_populated_dt(void)
 #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)
@@ -289,6 +295,13 @@ static inline int of_property_read_u64(const struct device_node *np,
        return -ENOSYS;
 }
 
+static inline struct device_node *of_parse_phandle(struct device_node *np,
+                                                  const char *phandle_name,
+                                                  int index)
+{
+       return NULL;
+}
+
 #define of_match_ptr(_ptr)     NULL
 #endif /* CONFIG_OF */