diff options
| author | Radim Krčmář <rkrcmar@redhat.com> | 2018-09-07 18:30:47 +0200 | 
|---|---|---|
| committer | Radim Krčmář <rkrcmar@redhat.com> | 2018-09-07 18:30:47 +0200 | 
| commit | ed2ef29100644eabc6099cbf1a3aa9d938555ab8 (patch) | |
| tree | dadd3eb5d77ae2c44adc92869c662292bd652f46 /include/linux/of.h | |
| parent | 732b53146ac8f604e45c593efe0579f78205fdcc (diff) | |
| parent | df88f3181f10565c6e3a89eb6f0f9e6afaaf15f1 (diff) | |
Merge tag 'kvm-s390-master-4.19-1' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux
KVM: s390: Fixes for 4.19
- Fallout from the hugetlbfs support: pfmf interpretion and locking
- VSIE: fix keywrapping for nested guests
Diffstat (limited to 'include/linux/of.h')
| -rw-r--r-- | include/linux/of.h | 33 | 
1 files changed, 33 insertions, 0 deletions
diff --git a/include/linux/of.h b/include/linux/of.h index 4d25e4f952d9..99b0ebf49632 100644 --- a/include/linux/of.h +++ b/include/linux/of.h @@ -256,6 +256,9 @@ static inline unsigned long of_read_ulong(const __be32 *cell, int size)  #define OF_IS_DYNAMIC(x) test_bit(OF_DYNAMIC, &x->_flags)  #define OF_MARK_DYNAMIC(x) set_bit(OF_DYNAMIC, &x->_flags) +extern bool of_node_name_eq(const struct device_node *np, const char *name); +extern bool of_node_name_prefix(const struct device_node *np, const char *prefix); +  static inline const char *of_node_full_name(const struct device_node *np)  {  	return np ? np->full_name : "<no-node>"; @@ -290,6 +293,8 @@ extern struct device_node *of_get_next_child(const struct device_node *node,  extern struct device_node *of_get_next_available_child(  	const struct device_node *node, struct device_node *prev); +extern struct device_node *of_get_compatible_child(const struct device_node *parent, +					const char *compatible);  extern struct device_node *of_get_child_by_name(const struct device_node *node,  					const char *name); @@ -561,6 +566,16 @@ static inline struct device_node *to_of_node(const struct fwnode_handle *fwnode)  	return NULL;  } +static inline bool of_node_name_eq(const struct device_node *np, const char *name) +{ +	return false; +} + +static inline bool of_node_name_prefix(const struct device_node *np, const char *prefix) +{ +	return false; +} +  static inline const char* of_node_full_name(const struct device_node *np)  {  	return "<no-node>"; @@ -632,6 +647,12 @@ static inline bool of_have_populated_dt(void)  	return false;  } +static inline struct device_node *of_get_compatible_child(const struct device_node *parent, +					const char *compatible) +{ +	return NULL; +} +  static inline struct device_node *of_get_child_by_name(  					const struct device_node *node,  					const char *name) @@ -967,6 +988,18 @@ static inline struct device_node *of_find_matching_node(  	return of_find_matching_node_and_match(from, matches, NULL);  } +static inline const char *of_node_get_device_type(const struct device_node *np) +{ +	return of_get_property(np, "type", NULL); +} + +static inline bool of_node_is_type(const struct device_node *np, const char *type) +{ +	const char *match = of_node_get_device_type(np); + +	return np && match && type && !strcmp(match, type); +} +  /**   * of_property_count_u8_elems - Count the number of u8 elements in a property   *  | 
