[POWERPC] Use strcasecmp() rather than strncasecmp() when determining device node...
authorScott Wood <scottwood@freescale.com>
Mon, 20 Aug 2007 16:36:59 +0000 (02:36 +1000)
committerPaul Mackerras <paulus@samba.org>
Wed, 22 Aug 2007 05:21:47 +0000 (15:21 +1000)
The current code assumes "foo-bar" must always be compatible with a node
compatible with "foo", which breaks device trees where this is not so.

The "case" part is also wrong according to Open Firmware, but it's more
likely to have drivers and/or device trees depending on it, and thus
needs to be handled more carefully.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
include/asm-powerpc/prom.h

index 920b75620f7464f8283675cec7f3f3b1aa50e106..925e2d384bb327e1dff9d3177dee37e38c932084 100644 (file)
@@ -24,7 +24,7 @@
 #define OF_ROOT_NODE_ADDR_CELLS_DEFAULT        1
 #define OF_ROOT_NODE_SIZE_CELLS_DEFAULT        1
 
-#define of_compat_cmp(s1, s2, l)       strncasecmp((s1), (s2), (l))
+#define of_compat_cmp(s1, s2, l)       strcasecmp((s1), (s2))
 #define of_prop_cmp(s1, s2)            strcmp((s1), (s2))
 #define of_node_cmp(s1, s2)            strcasecmp((s1), (s2))
 
This page took 0.025363 seconds and 5 git commands to generate.