Skip to content

Commit

Permalink
MIPS: lantiq: unbreak devicetree init
Browse files Browse the repository at this point in the history
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
  • Loading branch information
John Crispin committed Nov 11, 2012
1 parent 69b1803 commit a15d129
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions arch/mips/lantiq/prom.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,6 @@ void __init device_tree_init(void)
reserve_bootmem(base, size, BOOTMEM_DEFAULT);

unflatten_device_tree();

/* free the space reserved for the dt blob */
free_bootmem(base, size);
}

void __init prom_init(void)
Expand Down Expand Up @@ -119,7 +116,7 @@ int __init plat_of_setup(void)
sizeof(of_ids[0].compatible));
strncpy(of_ids[1].compatible, "simple-bus",
sizeof(of_ids[1].compatible));
return of_platform_bus_probe(NULL, of_ids, NULL);
return of_platform_populate(NULL, of_ids, NULL, NULL);
}

arch_initcall(plat_of_setup);

0 comments on commit a15d129

Please sign in to comment.