diff options
author | John Crispin <blogic@openwrt.org> | 2012-11-09 06:09:57 -0500 |
---|---|---|
committer | John Crispin <blogic@openwrt.org> | 2012-11-11 12:44:05 -0500 |
commit | a15d129a352e5f6ab821b81bc3f692ecc952a815 (patch) | |
tree | 1af7acc485e7d673eb43b828f57305c6c2ba35db | |
parent | 69b1803ab79ebda75df2bfcb1c2a54d6c3de5325 (diff) |
MIPS: lantiq: unbreak devicetree init
The bootmem was incorrectly freed resulting in lots of dangling pointers.
Additionally we should use of_platform_populate() as the Documentaion tells us
to do so.
Signed-off-by: John Crispin <blogic@openwrt.org>
Patchwork: http://patchwork.linux-mips.org/patch/4518
-rw-r--r-- | arch/mips/lantiq/prom.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/arch/mips/lantiq/prom.c b/arch/mips/lantiq/prom.c index 6cfd6117fbfd..9f9e875967aa 100644 --- a/arch/mips/lantiq/prom.c +++ b/arch/mips/lantiq/prom.c | |||
@@ -87,9 +87,6 @@ void __init device_tree_init(void) | |||
87 | reserve_bootmem(base, size, BOOTMEM_DEFAULT); | 87 | reserve_bootmem(base, size, BOOTMEM_DEFAULT); |
88 | 88 | ||
89 | unflatten_device_tree(); | 89 | unflatten_device_tree(); |
90 | |||
91 | /* free the space reserved for the dt blob */ | ||
92 | free_bootmem(base, size); | ||
93 | } | 90 | } |
94 | 91 | ||
95 | void __init prom_init(void) | 92 | void __init prom_init(void) |
@@ -119,7 +116,7 @@ int __init plat_of_setup(void) | |||
119 | sizeof(of_ids[0].compatible)); | 116 | sizeof(of_ids[0].compatible)); |
120 | strncpy(of_ids[1].compatible, "simple-bus", | 117 | strncpy(of_ids[1].compatible, "simple-bus", |
121 | sizeof(of_ids[1].compatible)); | 118 | sizeof(of_ids[1].compatible)); |
122 | return of_platform_bus_probe(NULL, of_ids, NULL); | 119 | return of_platform_populate(NULL, of_ids, NULL, NULL); |
123 | } | 120 | } |
124 | 121 | ||
125 | arch_initcall(plat_of_setup); | 122 | arch_initcall(plat_of_setup); |