diff options
author | Federico Fuga <fuga@studiofuga.com> | 2012-07-16 03:36:51 -0400 |
---|---|---|
committer | Ohad Ben-Cohen <ohad@wizery.com> | 2012-07-17 06:10:38 -0400 |
commit | 9634252617441991b01dacaf4040866feecaf36f (patch) | |
tree | 92d8b590a3d29cd79bc2d8152280c857b82cbb8d /drivers/rpmsg | |
parent | 84a1caf1453c3d44050bd22db958af4a7f99315c (diff) |
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 <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>
Diffstat (limited to 'drivers/rpmsg')
-rw-r--r-- | drivers/rpmsg/virtio_rpmsg_bus.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/rpmsg/virtio_rpmsg_bus.c b/drivers/rpmsg/virtio_rpmsg_bus.c index 39d3aa41adda..f56c8ba3a861 100644 --- a/drivers/rpmsg/virtio_rpmsg_bus.c +++ b/drivers/rpmsg/virtio_rpmsg_bus.c | |||
@@ -1085,7 +1085,7 @@ static int __init rpmsg_init(void) | |||
1085 | 1085 | ||
1086 | return ret; | 1086 | return ret; |
1087 | } | 1087 | } |
1088 | module_init(rpmsg_init); | 1088 | subsys_initcall(rpmsg_init); |
1089 | 1089 | ||
1090 | static void __exit rpmsg_fini(void) | 1090 | static void __exit rpmsg_fini(void) |
1091 | { | 1091 | { |