of: Export of_node_ktype for modular use of of_init_node
PATCH 1/1 of: Export of_node_ktype for modular use of of_init_node
To permit the use of of_init_node() by kernel modules, we must export of_node_ktype which is directly referenced by kobject_init() called from of_init_node() otherwise modules would be getting linking failures.
--- drivers/of/kobj.c | 1 + 1 file changed, 1 insertion(+)
drivers/of/kobj.c +1 -0
@@ -27,6 +27,7 @@ static void of_node_release(struct kobject *kobj)struct kobj_type of_node_ktype = { .release = of_node_release, }; +EXPORT_SYMBOL_GPL (of_node_ktype); static ssize_t of_node_property_read(struct file *filp, struct kobject *kobj, struct bin_attribute *bin_attr, char *buf,
Signature · 1 line
2.7.4
Quoted 4 lines · Florian Fainelli
To permit the use of
of_init_node()by kernel modules, we must exportof_node_ktypewhich is directly referenced bykobject_init()called fromof_init_node()otherwise modules would be getting linking failures.
You mean of_node_init()?
There's not anything in the kernel using this that's a module. It's a low level function that I don't really want to see more users for.
Rob
Quoted 7 lines · Rob Herring
Quoted 4 lines · Florian Fainelli
To permit the use of
of_init_node()by kernel modules, we must exportof_node_ktypewhich is directly referenced bykobject_init()called fromof_init_node()otherwise modules would be getting linking failures.You mean
of_node_init()?
Yes, I kept inverting the two words.
Quoted 3 lines
There's not anything in the kernel using this that's a module. It's a low level function that I don't really want to see more users for.
OK, fair enough, the candidate use I had in mind is probably too ugly to be submitted upstream anyway.
Signature · 1 line
Florian