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/sparc64/kernel/prom.c | |
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/sparc64/kernel/prom.c')
-rw-r--r-- | arch/sparc64/kernel/prom.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/sparc64/kernel/prom.c b/arch/sparc64/kernel/prom.c index f4e0a9ad9be3..d1a78c976cef 100644 --- a/arch/sparc64/kernel/prom.c +++ b/arch/sparc64/kernel/prom.c | |||
@@ -107,6 +107,21 @@ int of_set_property(struct device_node *dp, const char *name, void *val, int len | |||
107 | } | 107 | } |
108 | EXPORT_SYMBOL(of_set_property); | 108 | EXPORT_SYMBOL(of_set_property); |
109 | 109 | ||
110 | int of_find_in_proplist(const char *list, const char *match, int len) | ||
111 | { | ||
112 | while (len > 0) { | ||
113 | int l; | ||
114 | |||
115 | if (!strcmp(list, match)) | ||
116 | return 1; | ||
117 | l = strlen(list) + 1; | ||
118 | list += l; | ||
119 | len -= l; | ||
120 | } | ||
121 | return 0; | ||
122 | } | ||
123 | EXPORT_SYMBOL(of_find_in_proplist); | ||
124 | |||
110 | static unsigned int prom_early_allocated; | 125 | static unsigned int prom_early_allocated; |
111 | 126 | ||
112 | static void * __init prom_early_alloc(unsigned long size) | 127 | static void * __init prom_early_alloc(unsigned long size) |