aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/of.h
diff options
context:
space:
mode:
authorRajendra Nayak <rnayak@ti.com>2011-10-10 12:19:35 -0400
committerGrant Likely <grant.likely@secretlab.ca>2011-10-13 14:33:38 -0400
commit36a0904ea0a657567122edebb95eab5f1620a5eb (patch)
treee0a3277c0f52c5cbf37b66870bf19d4e74ad574e /include/linux/of.h
parent6b3754d6183797263bc6b28884323cf7842a8961 (diff)
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. Signed-off-by: Rajendra Nayak <rnayak@ti.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'include/linux/of.h')
-rw-r--r--include/linux/of.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/of.h b/include/linux/of.h
index 1cc9930ba06..736b7477beb 100644
--- a/include/linux/of.h
+++ b/include/linux/of.h
@@ -255,6 +255,12 @@ static inline bool of_have_populated_dt(void)
255#define for_each_child_of_node(parent, child) \ 255#define for_each_child_of_node(parent, child) \
256 while (0) 256 while (0)
257 257
258static inline int of_device_is_compatible(const struct device_node *device,
259 const char *name)
260{
261 return 0;
262}
263
258static inline struct property *of_find_property(const struct device_node *np, 264static inline struct property *of_find_property(const struct device_node *np,
259 const char *name, 265 const char *name,
260 int *lenp) 266 int *lenp)
@@ -289,6 +295,13 @@ static inline int of_property_read_u64(const struct device_node *np,
289 return -ENOSYS; 295 return -ENOSYS;
290} 296}
291 297
298static inline struct device_node *of_parse_phandle(struct device_node *np,
299 const char *phandle_name,
300 int index)
301{
302 return NULL;
303}
304
292#define of_match_ptr(_ptr) NULL 305#define of_match_ptr(_ptr) NULL
293#endif /* CONFIG_OF */ 306#endif /* CONFIG_OF */
294 307