From 391b459d7623b26153c7d8c200e8d213440a7d48 Mon Sep 17 00:00:00 2001 From: Pantelis Antoniou Date: Fri, 24 Apr 2015 12:41:56 +0300 Subject: of: Move OF flags to be visible even when !CONFIG_OF We need those to be visible even when compiling with CONFIG_OF disabled, since even the empty of_node_*_flag() method use the flag. Signed-off-by: Pantelis Antoniou Acked-by: Wolfram Sang Signed-off-by: Rob Herring --- include/linux/of.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'include/linux/of.h') diff --git a/include/linux/of.h b/include/linux/of.h index ddeaae6d2083..9b32cbdf0230 100644 --- a/include/linux/of.h +++ b/include/linux/of.h @@ -120,6 +120,12 @@ extern struct device_node *of_aliases; extern struct device_node *of_stdout; extern raw_spinlock_t devtree_lock; +/* flag descriptions (need to be visible even when !CONFIG_OF) */ +#define OF_DYNAMIC 1 /* node and properties were allocated via kmalloc */ +#define OF_DETACHED 2 /* node has been detached from the device tree */ +#define OF_POPULATED 3 /* device already created for the node */ +#define OF_POPULATED_BUS 4 /* of_platform_populate recursed to children of this node */ + #ifdef CONFIG_OF static inline bool is_of_node(struct fwnode_handle *fwnode) { @@ -217,12 +223,6 @@ static inline unsigned long of_read_ulong(const __be32 *cell, int size) #define of_node_cmp(s1, s2) strcasecmp((s1), (s2)) #endif -/* flag descriptions */ -#define OF_DYNAMIC 1 /* node and properties were allocated via kmalloc */ -#define OF_DETACHED 2 /* node has been detached from the device tree */ -#define OF_POPULATED 3 /* device already created for the node */ -#define OF_POPULATED_BUS 4 /* of_platform_populate recursed to children of this node */ - #define OF_IS_DYNAMIC(x) test_bit(OF_DYNAMIC, &x->_flags) #define OF_MARK_DYNAMIC(x) set_bit(OF_DYNAMIC, &x->_flags) -- cgit From 31712c98f8180c7bd3f33eefa461f0e1142e18f5 Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Mon, 4 May 2015 19:42:19 +0200 Subject: of: Grammar s/property exist/property exists/ Signed-off-by: Geert Uytterhoeven Signed-off-by: Rob Herring --- include/linux/of.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/linux/of.h') diff --git a/include/linux/of.h b/include/linux/of.h index 9b32cbdf0230..a3eb9d1e5800 100644 --- a/include/linux/of.h +++ b/include/linux/of.h @@ -815,7 +815,7 @@ static inline int of_property_read_string_index(struct device_node *np, * @propname: name of the property to be searched. * * Search for a property in a device node. - * Returns true if the property exist false otherwise. + * Returns true if the property exists false otherwise. */ static inline bool of_property_read_bool(const struct device_node *np, const char *propname) -- cgit From ce16b9d2356125eb791bd920c710b8512eecce54 Mon Sep 17 00:00:00 2001 From: Suman Anna Date: Wed, 17 Jun 2015 11:53:53 -0500 Subject: of: define of_find_node_by_phandle for !CONFIG_OF Define stub implementation for of_find_node_by_phandle() API so that users of this API can build properly even when CONFIG_OF is not defined. Fixes x86 randconfig build failure of remoteproc. Signed-off-by: Suman Anna [robh: add details on fixing remoteproc compile] Signed-off-by: Rob Herring --- include/linux/of.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/linux/of.h') diff --git a/include/linux/of.h b/include/linux/of.h index a3eb9d1e5800..54f858798e8c 100644 --- a/include/linux/of.h +++ b/include/linux/of.h @@ -422,6 +422,11 @@ static inline struct device_node *of_find_node_opts_by_path(const char *path, return NULL; } +static inline struct device_node *of_find_node_by_phandle(phandle handle) +{ + return NULL; +} + static inline struct device_node *of_get_parent(const struct device_node *node) { return NULL; -- cgit