devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] of: Export of_node_ktype for modular use of of_init_node
@ 2020-08-20 23:31 Florian Fainelli
  2020-08-21 22:00 ` Rob Herring
  0 siblings, 1 reply; 3+ messages in thread
From: Florian Fainelli @ 2020-08-20 23:31 UTC (permalink / raw)
  To: linux-kernel
  Cc: Florian Fainelli, Rob Herring, Frank Rowand, Grant Likely,
	Pantelis Antoniou,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE

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.

Fixes: 0829f6d1f69e ("of: device_node kobject lifecycle fixes")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
---
 drivers/of/kobj.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/of/kobj.c b/drivers/of/kobj.c
index a32e60b024b8..d7bbd156a671 100644
--- a/drivers/of/kobj.c
+++ b/drivers/of/kobj.c
@@ -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,
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] of: Export of_node_ktype for modular use of of_init_node
  2020-08-20 23:31 [PATCH] of: Export of_node_ktype for modular use of of_init_node Florian Fainelli
@ 2020-08-21 22:00 ` Rob Herring
  2020-08-21 22:01   ` Florian Fainelli
  0 siblings, 1 reply; 3+ messages in thread
From: Rob Herring @ 2020-08-21 22:00 UTC (permalink / raw)
  To: Florian Fainelli
  Cc: linux-kernel, Frank Rowand, Grant Likely, Pantelis Antoniou,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE

On Thu, Aug 20, 2020 at 5:31 PM Florian Fainelli <f.fainelli@gmail.com> wrote:
>
> 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.

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] of: Export of_node_ktype for modular use of of_init_node
  2020-08-21 22:00 ` Rob Herring
@ 2020-08-21 22:01   ` Florian Fainelli
  0 siblings, 0 replies; 3+ messages in thread
From: Florian Fainelli @ 2020-08-21 22:01 UTC (permalink / raw)
  To: Rob Herring
  Cc: linux-kernel, Frank Rowand, Grant Likely, Pantelis Antoniou,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE

On 8/21/20 3:00 PM, Rob Herring wrote:
> On Thu, Aug 20, 2020 at 5:31 PM Florian Fainelli <f.fainelli@gmail.com> wrote:
>>
>> 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.
> 
> You mean of_node_init()?

Yes, I kept inverting the two words.

> 
> 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.
-- 
Florian

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-08-21 22:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-20 23:31 [PATCH] of: Export of_node_ktype for modular use of of_init_node Florian Fainelli
2020-08-21 22:00 ` Rob Herring
2020-08-21 22:01   ` Florian Fainelli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).