diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/kernel/prom.c | 24 | ||||
-rw-r--r-- | arch/sparc/kernel/prom.c | 22 | ||||
-rw-r--r-- | arch/sparc64/kernel/prom.c | 22 |
3 files changed, 3 insertions, 65 deletions
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c index c009d2155f9c..3f6238d96a5d 100644 --- a/arch/powerpc/kernel/prom.c +++ b/arch/powerpc/kernel/prom.c | |||
@@ -80,10 +80,7 @@ struct boot_param_header *initial_boot_params; | |||
80 | 80 | ||
81 | static struct device_node *allnodes = NULL; | 81 | static struct device_node *allnodes = NULL; |
82 | 82 | ||
83 | /* use when traversing tree through the allnext, child, sibling, | 83 | extern rwlock_t devtree_lock; /* temporary while merging */ |
84 | * or parent members of struct device_node. | ||
85 | */ | ||
86 | static DEFINE_RWLOCK(devtree_lock); | ||
87 | 84 | ||
88 | /* export that to outside world */ | 85 | /* export that to outside world */ |
89 | struct device_node *of_chosen; | 86 | struct device_node *of_chosen; |
@@ -1489,25 +1486,6 @@ static int __init prom_reconfig_setup(void) | |||
1489 | __initcall(prom_reconfig_setup); | 1486 | __initcall(prom_reconfig_setup); |
1490 | #endif | 1487 | #endif |
1491 | 1488 | ||
1492 | struct property *of_find_property(const struct device_node *np, | ||
1493 | const char *name, | ||
1494 | int *lenp) | ||
1495 | { | ||
1496 | struct property *pp; | ||
1497 | |||
1498 | read_lock(&devtree_lock); | ||
1499 | for (pp = np->properties; pp != 0; pp = pp->next) | ||
1500 | if (strcmp(pp->name, name) == 0) { | ||
1501 | if (lenp != 0) | ||
1502 | *lenp = pp->length; | ||
1503 | break; | ||
1504 | } | ||
1505 | read_unlock(&devtree_lock); | ||
1506 | |||
1507 | return pp; | ||
1508 | } | ||
1509 | EXPORT_SYMBOL(of_find_property); | ||
1510 | |||
1511 | /* | 1489 | /* |
1512 | * Add a property to a node | 1490 | * Add a property to a node |
1513 | */ | 1491 | */ |
diff --git a/arch/sparc/kernel/prom.c b/arch/sparc/kernel/prom.c index f2ce0d48e102..0f5aab4326b3 100644 --- a/arch/sparc/kernel/prom.c +++ b/arch/sparc/kernel/prom.c | |||
@@ -27,10 +27,7 @@ | |||
27 | 27 | ||
28 | static struct device_node *allnodes; | 28 | static struct device_node *allnodes; |
29 | 29 | ||
30 | /* use when traversing tree through the allnext, child, sibling, | 30 | extern rwlock_t devtree_lock; /* temporary while merging */ |
31 | * or parent members of struct device_node. | ||
32 | */ | ||
33 | static DEFINE_RWLOCK(devtree_lock); | ||
34 | 31 | ||
35 | struct device_node *of_get_parent(const struct device_node *node) | 32 | struct device_node *of_get_parent(const struct device_node *node) |
36 | { | 33 | { |
@@ -130,23 +127,6 @@ struct device_node *of_find_compatible_node(struct device_node *from, | |||
130 | } | 127 | } |
131 | EXPORT_SYMBOL(of_find_compatible_node); | 128 | EXPORT_SYMBOL(of_find_compatible_node); |
132 | 129 | ||
133 | struct property *of_find_property(const struct device_node *np, | ||
134 | const char *name, | ||
135 | int *lenp) | ||
136 | { | ||
137 | struct property *pp; | ||
138 | |||
139 | for (pp = np->properties; pp != 0; pp = pp->next) { | ||
140 | if (strcasecmp(pp->name, name) == 0) { | ||
141 | if (lenp != 0) | ||
142 | *lenp = pp->length; | ||
143 | break; | ||
144 | } | ||
145 | } | ||
146 | return pp; | ||
147 | } | ||
148 | EXPORT_SYMBOL(of_find_property); | ||
149 | |||
150 | int of_getintprop_default(struct device_node *np, const char *name, int def) | 130 | int of_getintprop_default(struct device_node *np, const char *name, int def) |
151 | { | 131 | { |
152 | struct property *prop; | 132 | struct property *prop; |
diff --git a/arch/sparc64/kernel/prom.c b/arch/sparc64/kernel/prom.c index 4d6fb07f047f..a1ccc00c7958 100644 --- a/arch/sparc64/kernel/prom.c +++ b/arch/sparc64/kernel/prom.c | |||
@@ -32,10 +32,7 @@ | |||
32 | 32 | ||
33 | static struct device_node *allnodes; | 33 | static struct device_node *allnodes; |
34 | 34 | ||
35 | /* use when traversing tree through the allnext, child, sibling, | 35 | extern rwlock_t devtree_lock; /* temporary while merging */ |
36 | * or parent members of struct device_node. | ||
37 | */ | ||
38 | static DEFINE_RWLOCK(devtree_lock); | ||
39 | 36 | ||
40 | struct device_node *of_get_parent(const struct device_node *node) | 37 | struct device_node *of_get_parent(const struct device_node *node) |
41 | { | 38 | { |
@@ -135,23 +132,6 @@ struct device_node *of_find_compatible_node(struct device_node *from, | |||
135 | } | 132 | } |
136 | EXPORT_SYMBOL(of_find_compatible_node); | 133 | EXPORT_SYMBOL(of_find_compatible_node); |
137 | 134 | ||
138 | struct property *of_find_property(const struct device_node *np, | ||
139 | const char *name, | ||
140 | int *lenp) | ||
141 | { | ||
142 | struct property *pp; | ||
143 | |||
144 | for (pp = np->properties; pp != 0; pp = pp->next) { | ||
145 | if (strcasecmp(pp->name, name) == 0) { | ||
146 | if (lenp != 0) | ||
147 | *lenp = pp->length; | ||
148 | break; | ||
149 | } | ||
150 | } | ||
151 | return pp; | ||
152 | } | ||
153 | EXPORT_SYMBOL(of_find_property); | ||
154 | |||
155 | int of_getintprop_default(struct device_node *np, const char *name, int def) | 135 | int of_getintprop_default(struct device_node *np, const char *name, int def) |
156 | { | 136 | { |
157 | struct property *prop; | 137 | struct property *prop; |