aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2007-05-01 16:29:19 +1000
committerStephen Rothwell <sfr@canb.auug.org.au>2007-07-20 13:29:51 +1000
commit0081cbc3731de8ad4744ba433af51f17bf27eb9c (patch)
treeb03e5c4b7087ad78a230722850a29a72b2960663 /arch/powerpc/kernel
parentStart split out of common open firmware code (diff)
downloadlinux-dev-0081cbc3731de8ad4744ba433af51f17bf27eb9c.tar.xz
linux-dev-0081cbc3731de8ad4744ba433af51f17bf27eb9c.zip
Consolidate of_device_is_compatible
The only difference here is that Sparc uses strncmp to match compatibility names while PowerPC uses strncasecmp. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Acked-by: Paul Mackerras <paulus@samba.org> Acked-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r--arch/powerpc/kernel/prom.c25
1 files changed, 0 insertions, 25 deletions
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
index 6c9419a4d70a..c009d2155f9c 100644
--- a/arch/powerpc/kernel/prom.c
+++ b/arch/powerpc/kernel/prom.c
@@ -1057,31 +1057,6 @@ void __init early_init_devtree(void *params)
}
-/** Checks if the given "compat" string matches one of the strings in
- * the device's "compatible" property
- */
-int of_device_is_compatible(const struct device_node *device,
- const char *compat)
-{
- const char* cp;
- int cplen, l;
-
- cp = of_get_property(device, "compatible", &cplen);
- if (cp == NULL)
- return 0;
- while (cplen > 0) {
- if (strncasecmp(cp, compat, strlen(compat)) == 0)
- return 1;
- l = strlen(cp) + 1;
- cp += l;
- cplen -= l;
- }
-
- return 0;
-}
-EXPORT_SYMBOL(of_device_is_compatible);
-
-
/**
* Indicates whether the root node has a given value in its
* compatible property.