lkml.org 
[lkml]   [2012]   [Jul]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[ 18/37] rpmsg: fix dependency on initialization order
    Date
    From: Greg KH <gregkh@linuxfoundation.org>

    3.4-stable review patch. If anyone has any objections, please let me know.

    ------------------

    From: Federico Fuga <fuga@studiofuga.com>

    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 | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    --- a/drivers/rpmsg/virtio_rpmsg_bus.c
    +++ b/drivers/rpmsg/virtio_rpmsg_bus.c
    @@ -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)
    {



    \
     
     \ /
      Last update: 2012-07-18 04:01    [W:0.023 / U:60.808 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site