diff options
author | David S. Miller <davem@sunset.davemloft.net> | 2007-08-07 21:46:36 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-08-07 21:46:36 -0400 |
commit | 46bcea7751efc867ae4b073c99ad1d137a475bc0 (patch) | |
tree | 6600d52d5131d2ed1eb95640aa3604aecbcbc4af /arch/sparc/kernel | |
parent | 4a2a4df7b6db25df8f3d5cc6dd0b096119359d92 (diff) |
[SPARC]: Centralize find_in_proplist() instead of duplicating N times.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/kernel')
-rw-r--r-- | arch/sparc/kernel/prom.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/sparc/kernel/prom.c b/arch/sparc/kernel/prom.c index 39fbd3c8ab0b..cd4fb79aa3a8 100644 --- a/arch/sparc/kernel/prom.c +++ b/arch/sparc/kernel/prom.c | |||
@@ -102,6 +102,21 @@ int of_set_property(struct device_node *dp, const char *name, void *val, int len | |||
102 | } | 102 | } |
103 | EXPORT_SYMBOL(of_set_property); | 103 | EXPORT_SYMBOL(of_set_property); |
104 | 104 | ||
105 | int of_find_in_proplist(const char *list, const char *match, int len) | ||
106 | { | ||
107 | while (len > 0) { | ||
108 | int l; | ||
109 | |||
110 | if (!strcmp(list, match)) | ||
111 | return 1; | ||
112 | l = strlen(list) + 1; | ||
113 | list += l; | ||
114 | len -= l; | ||
115 | } | ||
116 | return 0; | ||
117 | } | ||
118 | EXPORT_SYMBOL(of_find_in_proplist); | ||
119 | |||
105 | static unsigned int prom_early_allocated; | 120 | static unsigned int prom_early_allocated; |
106 | 121 | ||
107 | static void * __init prom_early_alloc(unsigned long size) | 122 | static void * __init prom_early_alloc(unsigned long size) |