public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] of: base: upgrade initcall level of of_init from core to pure
@ 2015-05-12 17:38 Sudeep Holla
  2015-05-12 22:55 ` Rob Herring
  0 siblings, 1 reply; 7+ messages in thread
From: Sudeep Holla @ 2015-05-12 17:38 UTC (permalink / raw)
  To: linux-kernel, devicetree
  Cc: Sudeep Holla, Grant Likely, Rob Herring, Benjamin Herrenschmidt,
	Greg Kroah-Hartman

Commit 5590f3196b29 ("drivers/core/of: Add symlink to device-tree from
devices with an OF node") adds the symlink `of_node` for each device
pointing to it's device tree node while creating/initialising it.

However the devicetree sysfs is created and setup in of_init which is
executed at core_initcall level. For all the devices created at the core
initcall before of_init, the following error is thrown:
	"Error -2(-ENOENT) creating of_node link"

Since the core_initcall is the earliest point where devices get
registered, push initcall level of of_init from core to pure so that
the devicetree sysfs is ready before any devices are registered.

Cc: Grant Likely <grant.likely@linaro.org>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
---
 drivers/of/base.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/of/base.c b/drivers/of/base.c
index 99764db0875a..8c3d6b04c585 100644
--- a/drivers/of/base.c
+++ b/drivers/of/base.c
@@ -210,7 +210,7 @@ static int __init of_init(void)

 	return 0;
 }
-core_initcall(of_init);
+pure_initcall(of_init);

 static struct property *__of_find_property(const struct device_node *np,
 					   const char *name, int *lenp)
--
1.9.1


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

end of thread, other threads:[~2015-05-13 16:54 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-12 17:38 [PATCH] of: base: upgrade initcall level of of_init from core to pure Sudeep Holla
2015-05-12 22:55 ` Rob Herring
2015-05-13 10:03   ` Sudeep Holla
2015-05-13 13:46     ` Rob Herring
2015-05-13 14:50       ` Sudeep Holla
2015-05-13 16:34         ` Rob Herring
2015-05-13 16:54           ` Sudeep Holla

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox