summaryrefslogtreecommitdiffstats
path: root/arch/sparc
diff options
context:
space:
mode:
authorDavid S. Miller <davem@sunset.davemloft.net>2007-08-07 18:46:36 -0700
committerDavid S. Miller <davem@sunset.davemloft.net>2007-08-07 18:46:36 -0700
commit46bcea7751efc867ae4b073c99ad1d137a475bc0 (patch)
tree6600d52d5131d2ed1eb95640aa3604aecbcbc4af /arch/sparc
parent4a2a4df7b6db25df8f3d5cc6dd0b096119359d92 (diff)
downloadop-kernel-dev-46bcea7751efc867ae4b073c99ad1d137a475bc0.zip
op-kernel-dev-46bcea7751efc867ae4b073c99ad1d137a475bc0.tar.gz
[SPARC]: Centralize find_in_proplist() instead of duplicating N times.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc')
-rw-r--r--arch/sparc/kernel/prom.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/sparc/kernel/prom.c b/arch/sparc/kernel/prom.c
index 39fbd3c..cd4fb79a 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
}
EXPORT_SYMBOL(of_set_property);
+int of_find_in_proplist(const char *list, const char *match, int len)
+{
+ while (len > 0) {
+ int l;
+
+ if (!strcmp(list, match))
+ return 1;
+ l = strlen(list) + 1;
+ list += l;
+ len -= l;
+ }
+ return 0;
+}
+EXPORT_SYMBOL(of_find_in_proplist);
+
static unsigned int prom_early_allocated;
static void * __init prom_early_alloc(unsigned long size)
OpenPOWER on IntegriCloud