Commit 9127dc47 authored by Kevin Cernekee's avatar Kevin Cernekee Committed by Ralf Baechle

MIPS: Let __dt_register_buses accept a single bus type

Some machines only have one bus type to register (e.g. "simple-bus").
Signed-off-by: default avatarKevin Cernekee <cernekee@gmail.com>
Cc: f.fainelli@gmail.com
Cc: jaedon.shin@gmail.com
Cc: abrestic@chromium.org
Cc: tglx@linutronix.de
Cc: jason@lakedaemon.net
Cc: jogo@openwrt.org
Cc: arnd@arndb.de
Cc: computersforpeace@gmail.com
Cc: linux-mips@linux-mips.org
Cc: devicetree@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/8845/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent 5f7f0317
......@@ -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");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment