diff options
| author | Kevin Cernekee <[email protected]> | 2014-12-25 09:49:07 -0800 |
|---|---|---|
| committer | Ralf Baechle <[email protected]> | 2015-04-01 17:21:38 +0200 |
| commit | 9127dc478cd6c3bae3f20df78ea932528cd6b092 (patch) | |
| tree | 4a0474de4b0d633ee22853b7761dd1d6f64a97a1 | |
| parent | 5f7f0317ed28b86bdae9baf65bb72d405b6f79ee (diff) | |
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: Kevin Cernekee <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Cc: [email protected]
Patchwork: https://patchwork.linux-mips.org/patch/8845/
Signed-off-by: Ralf Baechle <[email protected]>
| -rw-r--r-- | arch/mips/kernel/prom.c | 5 |
1 files changed, 4 insertions, 1 deletions
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"); |