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>
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)