diff options
author | Rajendra Nayak <rnayak@ti.com> | 2011-10-10 21:49:35 +0530 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2011-10-13 12:33:38 -0600 |
commit | 36a0904ea0a657567122edebb95eab5f1620a5eb (patch) | |
tree | e0a3277c0f52c5cbf37b66870bf19d4e74ad574e /include/linux/of.h | |
parent | 6b3754d6183797263bc6b28884323cf7842a8961 (diff) | |
download | blackbird-op-linux-36a0904ea0a657567122edebb95eab5f1620a5eb.tar.gz blackbird-op-linux-36a0904ea0a657567122edebb95eab5f1620a5eb.zip |
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.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/of.h b/include/linux/of.h index 1cc9930ba06a..736b7477beb2 100644 --- a/include/linux/of.h +++ b/include/linux/of.h @@ -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 */ |