diff options
Diffstat (limited to 'include/linux/of.h')
-rw-r--r-- | include/linux/of.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/linux/of.h b/include/linux/of.h index fa089a2789a0..cfc34117fc92 100644 --- a/include/linux/of.h +++ b/include/linux/of.h @@ -100,10 +100,11 @@ struct of_reconfig_data { /* initialize a node */ extern struct kobj_type of_node_ktype; +extern const struct fwnode_operations of_fwnode_ops; static inline void of_node_init(struct device_node *node) { kobject_init(&node->kobj, &of_node_ktype); - node->fwnode.type = FWNODE_OF; + node->fwnode.ops = &of_fwnode_ops; } /* true when node is initialized */ @@ -150,7 +151,7 @@ void of_core_init(void); static inline bool is_of_node(const struct fwnode_handle *fwnode) { - return !IS_ERR_OR_NULL(fwnode) && fwnode->type == FWNODE_OF; + return !IS_ERR_OR_NULL(fwnode) && fwnode->ops == &of_fwnode_ops; } #define to_of_node(__fwnode) \ |