public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 1/1] usb: ulpi: ulpi_init should be executed in subsys_initcall
@ 2015-05-22 11:29 Lu Baolu
  2015-05-22 16:08 ` David Cohen
  0 siblings, 1 reply; 6+ messages in thread
From: Lu Baolu @ 2015-05-22 11:29 UTC (permalink / raw)
  To: Heikki Krogerus, Greg Kroah-Hartman, David Cohen
  Cc: linux-usb, linux-kernel, Lu Baolu

Phy drivers and the ulpi interface providers depend on the
registeration of the ulpi bus.  Ulpi registers the bus in
module_init(). This could result in a load order issue, i.e.
ulpi phy drivers or the ulpi interface providers loading
before the bus registeration.

This patch fixes this load order issue by putting ulpi_init
in subsys_initcall().

Reported-by: Zhuo Qiuxu <qiuxu.zhuo@intel.com>
Signed-off-by: Lu Baolu <baolu.lu@linux.intel.com>
---
 drivers/usb/common/ulpi.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/common/ulpi.c b/drivers/usb/common/ulpi.c
index 0e6f968..01c0c04 100644
--- a/drivers/usb/common/ulpi.c
+++ b/drivers/usb/common/ulpi.c
@@ -242,7 +242,7 @@ static int __init ulpi_init(void)
 {
 	return bus_register(&ulpi_bus);
 }
-module_init(ulpi_init);
+subsys_initcall(ulpi_init);
 
 static void __exit ulpi_exit(void)
 {
-- 
2.1.4


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

end of thread, other threads:[~2015-05-27  1:33 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-22 11:29 [PATCH v3 1/1] usb: ulpi: ulpi_init should be executed in subsys_initcall Lu Baolu
2015-05-22 16:08 ` David Cohen
2015-05-25  6:24   ` Lu, Baolu
2015-05-26 14:50     ` Felipe Balbi
2015-05-27  1:33       ` Lu, Baolu
2015-05-25 12:09   ` Heikki Krogerus

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