aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/of/fdt.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/of/fdt.c')
-rw-r--r--drivers/of/fdt.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
index 616a4767a950..7f8861121a31 100644
--- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c
@@ -310,12 +310,11 @@ unsigned long __init unflatten_dt_node(unsigned long mem,
310 __alignof__(struct property)); 310 __alignof__(struct property));
311 if (allnextpp) { 311 if (allnextpp) {
312 if (strcmp(pname, "linux,phandle") == 0) { 312 if (strcmp(pname, "linux,phandle") == 0) {
313 np->node = *((u32 *)*p); 313 if (np->phandle == 0)
314 if (np->linux_phandle == 0) 314 np->phandle = *((u32 *)*p);
315 np->linux_phandle = np->node;
316 } 315 }
317 if (strcmp(pname, "ibm,phandle") == 0) 316 if (strcmp(pname, "ibm,phandle") == 0)
318 np->linux_phandle = *((u32 *)*p); 317 np->phandle = *((u32 *)*p);
319 pp->name = pname; 318 pp->name = pname;
320 pp->length = sz; 319 pp->length = sz;
321 pp->value = (void *)*p; 320 pp->value = (void *)*p;