| 1 | From a15d129a352e5f6ab821b81bc3f692ecc952a815 Mon Sep 17 00:00:00 2001 |
| 2 | From: John Crispin <blogic@openwrt.org> |
| 3 | Date: Fri, 9 Nov 2012 12:09:57 +0100 |
| 4 | Subject: [PATCH 1/6] MIPS: lantiq: unbreak devicetree init |
| 5 | |
| 6 | The bootmem was incorrectly freed resulting in lots of dangling pointers. |
| 7 | Additionally we should use of_platform_populate() as the Documentaion tells us |
| 8 | to do so. |
| 9 | |
| 10 | Signed-off-by: John Crispin <blogic@openwrt.org> |
| 11 | Patchwork: http://patchwork.linux-mips.org/patch/4518 |
| 12 | --- |
| 13 | arch/mips/lantiq/prom.c | 5 +---- |
| 14 | 1 file changed, 1 insertion(+), 4 deletions(-) |
| 15 | |
| 16 | diff --git a/arch/mips/lantiq/prom.c b/arch/mips/lantiq/prom.c |
| 17 | index 6cfd611..9f9e875 100644 |
| 18 | --- a/arch/mips/lantiq/prom.c |
| 19 | +++ b/arch/mips/lantiq/prom.c |
| 20 | @@ -87,9 +87,6 @@ void __init device_tree_init(void) |
| 21 | reserve_bootmem(base, size, BOOTMEM_DEFAULT); |
| 22 | |
| 23 | unflatten_device_tree(); |
| 24 | - |
| 25 | - /* free the space reserved for the dt blob */ |
| 26 | - free_bootmem(base, size); |
| 27 | } |
| 28 | |
| 29 | void __init prom_init(void) |
| 30 | @@ -119,7 +116,7 @@ int __init plat_of_setup(void) |
| 31 | sizeof(of_ids[0].compatible)); |
| 32 | strncpy(of_ids[1].compatible, "simple-bus", |
| 33 | sizeof(of_ids[1].compatible)); |
| 34 | - return of_platform_bus_probe(NULL, of_ids, NULL); |
| 35 | + return of_platform_populate(NULL, of_ids, NULL, NULL); |
| 36 | } |
| 37 | |
| 38 | arch_initcall(plat_of_setup); |
| 39 | -- |
| 40 | 1.7.10.4 |
| 41 | |
| 42 | |