Skip to content

Commit

Permalink
rpmsg: fix dependency on initialization order
Browse files Browse the repository at this point in the history
When rpmsg drivers are built into the kernel, they must not initialize
before the rpmsg bus does, otherwise they'd trigger a BUG() in
drivers/base/driver.c line 169 (driver_register()).

To fix that, and to stop depending on arbitrary linkage ordering of
those built-in rpmsg drivers, we make the rpmsg bus initialize at
subsys_initcall.

Cc: stable <stable@vger.kernel.org>
Signed-off-by: Federico Fuga <fuga@studiofuga.com>
[ohad: rewrite the commit log]
Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
  • Loading branch information
Federico Fuga authored and Ohad Ben-Cohen committed Jul 17, 2012
1 parent 84a1caf commit 9634252
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/rpmsg/virtio_rpmsg_bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -1085,7 +1085,7 @@ static int __init rpmsg_init(void)

return ret;
}
module_init(rpmsg_init);
subsys_initcall(rpmsg_init);

static void __exit rpmsg_fini(void)
{
Expand Down

0 comments on commit 9634252

Please sign in to comment.