All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] phy: core: fix registration of built in drivers
@ 2015-03-27  3:51 Baruch Siach
  0 siblings, 0 replies; only message in thread
From: Baruch Siach @ 2015-03-27  3:51 UTC (permalink / raw)
  To: Kishon Vijay Abraham I; +Cc: linux-kernel, Baruch Siach

Built in PHY drivers probe may run as early as arch_initcall. This is the case
on ARM when device tree is enabled, since of_platform_populate() is called from
customize_machine(). The trouble is that at this stage phy_class is not yet
initialized, and as a result device_add() does not add the newly registered PHY
to the list of class device. This breaks of_phy_simple_xlate().

Move phy_class initialization before arch_initcall to fix this.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
 drivers/phy/phy-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/phy/phy-core.c b/drivers/phy/phy-core.c
index a12d35338313..648c3b179459 100644
--- a/drivers/phy/phy-core.c
+++ b/drivers/phy/phy-core.c
@@ -892,7 +892,7 @@ static int __init phy_core_init(void)
 
 	return 0;
 }
-module_init(phy_core_init);
+postcore_initcall(phy_core_init);
 
 static void __exit phy_core_exit(void)
 {
-- 
2.1.4


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2015-03-27  3:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-27  3:51 [PATCH] phy: core: fix registration of built in drivers Baruch Siach

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.