aboutsummaryrefslogtreecommitdiffstats
path: root/xen/common/device_tree.c
diff options
context:
space:
mode:
authorStefano Stabellini <stefano.stabellini@eu.citrix.com>2012-12-13 11:44:01 +0000
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>2012-12-13 11:44:01 +0000
commitb232542c277228312e35b2a71e0f8dbb35854099 (patch)
tree8688b93f55ab23e83c40daadde1dfffc437efe2f /xen/common/device_tree.c
parent01dedfbcdfbcbdf15ac3d60edc2d15536f999349 (diff)
downloadxen-b232542c277228312e35b2a71e0f8dbb35854099.tar.gz
xen-b232542c277228312e35b2a71e0f8dbb35854099.tar.bz2
xen-b232542c277228312e35b2a71e0f8dbb35854099.zip
xen/arm: use strcmp in device_tree_type_matches
We want to match the exact string rather than the first subset. Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: Ian Campbell <ian.campbell@citrix.com> Committed-by: Ian Campbell <ian.campbell@citrix.com>
Diffstat (limited to 'xen/common/device_tree.c')
-rw-r--r--xen/common/device_tree.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/xen/common/device_tree.c b/xen/common/device_tree.c
index 7a072cb930..8b4ef2f45c 100644
--- a/xen/common/device_tree.c
+++ b/xen/common/device_tree.c
@@ -44,14 +44,13 @@ bool_t device_tree_node_matches(const void *fdt, int node, const char *match)
bool_t device_tree_type_matches(const void *fdt, int node, const char *match)
{
- int len;
const void *prop;
- prop = fdt_getprop(fdt, node, "device_type", &len);
+ prop = fdt_getprop(fdt, node, "device_type", NULL);
if ( prop == NULL )
return 0;
- return !strncmp(prop, match, len);
+ return !strcmp(prop, match);
}
bool_t device_tree_node_compatible(const void *fdt, int node, const char *match)