diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-10 11:57:03 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-10 11:57:03 -0500 |
commit | 0bd2cbcdfaff9cb22267d66fc843fa4f73f0c281 (patch) | |
tree | 7d9732bcf5f2f646cb0c2c529c48b454b15d4ae2 /scripts/dtc/fstree.c | |
parent | 57cc7215b70856dc6bae8e55b00ecd7b1d7429b1 (diff) | |
parent | a081748735c5feb96b1365e78a5ff0fb6ca7e3a4 (diff) |
Merge branch 'next-devicetree' of git://git.secretlab.ca/git/linux-2.6
* 'next-devicetree' of git://git.secretlab.ca/git/linux-2.6: (29 commits)
of/flattree: forward declare struct device_node in of_fdt.h
ipmi: explicitly include of_address.h and of_irq.h
sparc: explicitly cast negative phandle checks to s32
powerpc/405: Fix missing #{address,size}-cells in i2c node
powerpc/5200: dts: refactor dts files
powerpc/5200: dts: Change combatible strings on localbus
powerpc/5200: dts: remove unused properties
powerpc/5200: dts: rename nodes to prepare for refactoring dts files
of/flattree: Update dtc to current mainline.
of/device: Don't register disabled devices
powerpc/dts: fix syntax bugs in bluestone.dts
of: Fixes for OF probing on little endian systems
of: make drivers depend on CONFIG_OF instead of CONFIG_PPC_OF
of/flattree: Add of_flat_dt_match() helper function
of_serial: explicitly include of_irq.h
of/flattree: Refactor unflatten_device_tree and add fdt_unflatten_tree
of/flattree: Reorder unflatten_dt_node
of/flattree: Refactor unflatten_dt_node
of/flattree: Add non-boottime device tree functions
of/flattree: Add Kconfig for EARLY_FLATTREE
...
Fix up trivial conflict in arch/sparc/prom/tree_32.c as per Grant.
Diffstat (limited to 'scripts/dtc/fstree.c')
-rw-r--r-- | scripts/dtc/fstree.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/scripts/dtc/fstree.c b/scripts/dtc/fstree.c index 8fe1bdf239f0..f3774530170a 100644 --- a/scripts/dtc/fstree.c +++ b/scripts/dtc/fstree.c | |||
@@ -58,10 +58,9 @@ static struct node *read_fstree(const char *dirname) | |||
58 | "WARNING: Cannot open %s: %s\n", | 58 | "WARNING: Cannot open %s: %s\n", |
59 | tmpnam, strerror(errno)); | 59 | tmpnam, strerror(errno)); |
60 | } else { | 60 | } else { |
61 | prop = build_property(strdup(de->d_name), | 61 | prop = build_property(xstrdup(de->d_name), |
62 | data_copy_file(pfile, | 62 | data_copy_file(pfile, |
63 | st.st_size), | 63 | st.st_size)); |
64 | NULL); | ||
65 | add_property(tree, prop); | 64 | add_property(tree, prop); |
66 | fclose(pfile); | 65 | fclose(pfile); |
67 | } | 66 | } |
@@ -69,8 +68,7 @@ static struct node *read_fstree(const char *dirname) | |||
69 | struct node *newchild; | 68 | struct node *newchild; |
70 | 69 | ||
71 | newchild = read_fstree(tmpnam); | 70 | newchild = read_fstree(tmpnam); |
72 | newchild = name_node(newchild, strdup(de->d_name), | 71 | newchild = name_node(newchild, xstrdup(de->d_name)); |
73 | NULL); | ||
74 | add_child(tree, newchild); | 72 | add_child(tree, newchild); |
75 | } | 73 | } |
76 | 74 | ||
@@ -86,8 +84,8 @@ struct boot_info *dt_from_fs(const char *dirname) | |||
86 | struct node *tree; | 84 | struct node *tree; |
87 | 85 | ||
88 | tree = read_fstree(dirname); | 86 | tree = read_fstree(dirname); |
89 | tree = name_node(tree, "", NULL); | 87 | tree = name_node(tree, ""); |
90 | 88 | ||
91 | return build_boot_info(NULL, tree, 0); | 89 | return build_boot_info(NULL, tree, guess_boot_cpuid(tree)); |
92 | } | 90 | } |
93 | 91 | ||