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.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c
index c2b08dcdbc53..c8be32644c85 100644
--- a/drivers/of/fdt.c
+++ b/drivers/of/fdt.c
@@ -199,10 +199,10 @@ static unsigned long unflatten_dt_node(struct boot_param_header *blob,
199 np = unflatten_dt_alloc(&mem, sizeof(struct device_node) + allocl, 199 np = unflatten_dt_alloc(&mem, sizeof(struct device_node) + allocl,
200 __alignof__(struct device_node)); 200 __alignof__(struct device_node));
201 if (allnextpp) { 201 if (allnextpp) {
202 char *fn;
202 memset(np, 0, sizeof(*np)); 203 memset(np, 0, sizeof(*np));
203 np->full_name = ((char *)np) + sizeof(struct device_node); 204 np->full_name = fn = ((char *)np) + sizeof(*np);
204 if (new_format) { 205 if (new_format) {
205 char *fn = np->full_name;
206 /* rebuild full path for new format */ 206 /* rebuild full path for new format */
207 if (dad && dad->parent) { 207 if (dad && dad->parent) {
208 strcpy(fn, dad->full_name); 208 strcpy(fn, dad->full_name);
@@ -216,9 +216,9 @@ static unsigned long unflatten_dt_node(struct boot_param_header *blob,
216 fn += strlen(fn); 216 fn += strlen(fn);
217 } 217 }
218 *(fn++) = '/'; 218 *(fn++) = '/';
219 memcpy(fn, pathp, l); 219 }
220 } else 220 memcpy(fn, pathp, l);
221 memcpy(np->full_name, pathp, l); 221
222 prev_pp = &np->properties; 222 prev_pp = &np->properties;
223 **allnextpp = np; 223 **allnextpp = np;
224 *allnextpp = &np->allnext; 224 *allnextpp = &np->allnext;