lkml.org 
[lkml]   [2014]   [Nov]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH V3 08/11] MIPS: Let __dt_register_buses accept a single bus type
    Date
    Some machines only have one bus type to register (e.g. "simple-bus").

    Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
    ---
    arch/mips/kernel/prom.c | 5 ++++-
    1 file changed, 4 insertions(+), 1 deletion(-)

    diff --git a/arch/mips/kernel/prom.c b/arch/mips/kernel/prom.c
    index 452d4350ce42..e303cb1ef2f4 100644
    --- a/arch/mips/kernel/prom.c
    +++ b/arch/mips/kernel/prom.c
    @@ -64,7 +64,10 @@ int __init __dt_register_buses(const char *bus0, const char *bus1)
    panic("device tree not present");

    strlcpy(of_ids[0].compatible, bus0, sizeof(of_ids[0].compatible));
    - strlcpy(of_ids[1].compatible, bus1, sizeof(of_ids[1].compatible));
    + if (bus1) {
    + strlcpy(of_ids[1].compatible, bus1,
    + sizeof(of_ids[1].compatible));
    + }

    if (of_platform_populate(NULL, of_ids, NULL, NULL))
    panic("failed to populate DT");
    --
    2.1.1


    \
     
     \ /
      Last update: 2014-11-24 04:21    [W:2.925 / U:0.100 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site