mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Federico Fuga <fuga@studiofuga.com>
To: linux-kernel@vger.kernel.org
Cc: Ohad Ben-Cohen <ohad@wizery.com>, Federico Fuga <fuga@studiofuga.com>
Subject: [PATCH] rpmsg bus subsys_initcall initialization ordering
Date: Tue, 10 Jul 2012 18:07:24 +0200	[thread overview]
Message-ID: <1341936444-3094-1-git-send-email-fuga@studiofuga.com> (raw)

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


             reply	other threads:[~2012-07-10 16:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-10 16:07 Federico Fuga [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1341936444-3094-1-git-send-email-fuga@studiofuga.com \
    --to=fuga@studiofuga.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ohad@wizery.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®