mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] rpmsg bus subsys_initcall initialization ordering
@ 2012-07-10 16:07 Federico Fuga
  2012-07-10 16:22 ` Ohad Ben-Cohen
  0 siblings, 1 reply; 6+ messages in thread
From: Federico Fuga @ 2012-07-10 16:07 UTC (permalink / raw)
  To: linux-kernel; +Cc: Ohad Ben-Cohen, Federico Fuga

omaprpc depends on the rpmsg bus.
When those two modules are compiled statically, the omaprpc is initialized before the rpmsg bus, triggering a BUG() in driver_register.
This of course can be prevented if they are compiled as modules and loaded in the right order.
This patch solves this problem by forcing the rpmsg module to be initialized at subsystem level.

Signed-off-by: Federico Fuga <fuga@studiofuga.com>
---
 drivers/rpmsg/virtio_rpmsg_bus.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/rpmsg/virtio_rpmsg_bus.c b/drivers/rpmsg/virtio_rpmsg_bus.c
index 210c4eb..589819f 100644
--- a/drivers/rpmsg/virtio_rpmsg_bus.c
+++ b/drivers/rpmsg/virtio_rpmsg_bus.c
@@ -1078,7 +1078,7 @@ static int __init rpmsg_init(void)
 
 	return ret;
 }
-module_init(rpmsg_init);
+subsys_initcall(rpmsg_init);
 
 static void __exit rpmsg_fini(void)
 {
-- 
1.7.9.5


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

end of thread, other threads:[~2012-07-16  7:47 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-10 16:07 [PATCH] rpmsg bus subsys_initcall initialization ordering Federico Fuga
2012-07-10 16:22 ` Ohad Ben-Cohen
2012-07-10 16:43   ` Federico Fuga
2012-07-10 19:27     ` Ohad Ben-Cohen
     [not found]       ` <47AF0F55-39D1-4B7E-BE0E-D2395989322D@studiofuga.com>
2012-07-13 18:00         ` Ohad Ben-Cohen
2012-07-16  7:47           ` Ohad Ben-Cohen

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

all inboxes | Powered by JetHome®