diff options
author | Julien Grall <julien.grall@linaro.org> | 2013-09-13 13:49:12 +0100 |
---|---|---|
committer | Ian Campbell <ian.campbell@citrix.com> | 2013-09-17 15:27:54 +0100 |
commit | 6db389ab3fc4214c4ed3df07253879dee2254edc (patch) | |
tree | 477175c78c1aba215e21013347e978df48e9637d /xen/common | |
parent | c88d32f463f75664285fd98856a7cdc6e01409bc (diff) | |
download | xen-6db389ab3fc4214c4ed3df07253879dee2254edc.tar.gz xen-6db389ab3fc4214c4ed3df07253879dee2254edc.tar.bz2 xen-6db389ab3fc4214c4ed3df07253879dee2254edc.zip |
xen: Use the right string comparison function in device tree
When of_node_cmp and of_compat_cmp was introduced in commit fb97eb6
"xen/arm: Create a hierarchical device tree", they were copied from the wrong
Linux header.
Signed-off-by: Julien Grall <julien.grall@linaro.org>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Diffstat (limited to 'xen/common')
-rw-r--r-- | xen/common/device_tree.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/xen/common/device_tree.c b/xen/common/device_tree.c index 7e451b19e9..a73eee804c 100644 --- a/xen/common/device_tree.c +++ b/xen/common/device_tree.c @@ -144,7 +144,7 @@ bool_t __init device_tree_node_compatible(const void *fdt, int node, return 0; while ( len > 0 ) { - if ( !dt_compat_cmp(prop, match, mlen) ) + if ( !dt_compat_cmp(prop, match) ) return 1; l = strlen(prop) + 1; prop += l; @@ -564,7 +564,7 @@ dt_find_property(const struct dt_device_node *np, for ( pp = np->properties; pp; pp = pp->next ) { - if ( strcmp(pp->name, name) == 0 ) + if ( dt_prop_cmp(pp->name, name) == 0 ) { if ( lenp ) *lenp = pp->length; @@ -626,7 +626,7 @@ bool_t dt_device_is_compatible(const struct dt_device_node *device, return 0; while ( cplen > 0 ) { - if ( dt_compat_cmp(cp, compat, strlen(compat)) == 0 ) + if ( dt_compat_cmp(cp, compat) == 0 ) return 1; l = strlen(cp) + 1; cp += l; |