rpmsg: fix dependency on initialization order

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 <[email protected]>
Signed-off-by: Federico Fuga <[email protected]>
[ohad: rewrite the commit log]
Signed-off-by: Ohad Ben-Cohen <[email protected]>
This commit is contained in:
Federico Fuga 2012-07-16 10:36:51 +03:00 • committed by Ohad Ben-Cohen
commit 9634252617

View file

@ -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)
{