diff options
Diffstat (limited to 'drivers/of/fdt.c')
-rw-r--r-- | drivers/of/fdt.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c index dc876cbbd9dd..65da5aec7552 100644 --- a/drivers/of/fdt.c +++ b/drivers/of/fdt.c | |||
@@ -320,13 +320,13 @@ unsigned long __init unflatten_dt_node(unsigned long mem, | |||
320 | if ((strcmp(pname, "phandle") == 0) || | 320 | if ((strcmp(pname, "phandle") == 0) || |
321 | (strcmp(pname, "linux,phandle") == 0)) { | 321 | (strcmp(pname, "linux,phandle") == 0)) { |
322 | if (np->phandle == 0) | 322 | if (np->phandle == 0) |
323 | np->phandle = *((u32 *)*p); | 323 | np->phandle = be32_to_cpup((__be32*)*p); |
324 | } | 324 | } |
325 | /* And we process the "ibm,phandle" property | 325 | /* And we process the "ibm,phandle" property |
326 | * used in pSeries dynamic device tree | 326 | * used in pSeries dynamic device tree |
327 | * stuff */ | 327 | * stuff */ |
328 | if (strcmp(pname, "ibm,phandle") == 0) | 328 | if (strcmp(pname, "ibm,phandle") == 0) |
329 | np->phandle = *((u32 *)*p); | 329 | np->phandle = be32_to_cpup((__be32 *)*p); |
330 | pp->name = pname; | 330 | pp->name = pname; |
331 | pp->length = sz; | 331 | pp->length = sz; |
332 | pp->value = (void *)*p; | 332 | pp->value = (void *)*p; |