mirror of https://gitee.com/openkylin/linux.git
of: make struct property _flags field configurable
Only Sparc and CONFIG_OF_DYNAMIC use the struct property._flags field, so make it conditional shrinking struct property a bit. Tested-by: Nicolas Pitre <nico@linaro.org> Reviewed-by: Frank Rowand <frowand.list@gmail.com> Acked-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Rob Herring <robh@kernel.org>
This commit is contained in:
parent
36689ecd2c
commit
16bba30eab
|
@ -37,7 +37,9 @@ struct property {
|
||||||
int length;
|
int length;
|
||||||
void *value;
|
void *value;
|
||||||
struct property *next;
|
struct property *next;
|
||||||
|
#if defined(CONFIG_OF_DYNAMIC) || defined(CONFIG_SPARC)
|
||||||
unsigned long _flags;
|
unsigned long _flags;
|
||||||
|
#endif
|
||||||
#if defined(CONFIG_OF_PROMTREE)
|
#if defined(CONFIG_OF_PROMTREE)
|
||||||
unsigned int unique_id;
|
unsigned int unique_id;
|
||||||
#endif
|
#endif
|
||||||
|
@ -205,6 +207,7 @@ static inline void of_node_clear_flag(struct device_node *n, unsigned long flag)
|
||||||
clear_bit(flag, &n->_flags);
|
clear_bit(flag, &n->_flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(CONFIG_OF_DYNAMIC) || defined(CONFIG_SPARC)
|
||||||
static inline int of_property_check_flag(struct property *p, unsigned long flag)
|
static inline int of_property_check_flag(struct property *p, unsigned long flag)
|
||||||
{
|
{
|
||||||
return test_bit(flag, &p->_flags);
|
return test_bit(flag, &p->_flags);
|
||||||
|
@ -219,6 +222,7 @@ static inline void of_property_clear_flag(struct property *p, unsigned long flag
|
||||||
{
|
{
|
||||||
clear_bit(flag, &p->_flags);
|
clear_bit(flag, &p->_flags);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
extern struct device_node *__of_find_all_nodes(struct device_node *prev);
|
extern struct device_node *__of_find_all_nodes(struct device_node *prev);
|
||||||
extern struct device_node *of_find_all_nodes(struct device_node *prev);
|
extern struct device_node *of_find_all_nodes(struct device_node *prev);
|
||||||
|
|
Loading…
Reference in New Issue