rpmsg: fix dependency on initialization order
authorFederico Fuga <fuga@studiofuga.com>
Mon, 16 Jul 2012 07:36:51 +0000 (10:36 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 19 Jul 2012 15:58:57 +0000 (08:58 -0700)
commitc8ed7cf355f41b649524029c49f101d878499482
treecac2bc33c83b69a8157c9f871b06e434232d1954
parent1214b7852425b78a2b73b0a759ec55210340396d
rpmsg: fix dependency on initialization order

commit 9634252617441991b01dacaf4040866feecaf36f upstream.

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.

Signed-off-by: Federico Fuga <fuga@studiofuga.com>
[ohad: rewrite the commit log]
Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/rpmsg/virtio_rpmsg_bus.c