if ( platform && platform->blacklist_dev )
blacklist = platform->blacklist_dev;
- return dt_match_node(blacklist, node);
+ return (dt_match_node(blacklist, node) != NULL);
}
unsigned int platform_dom0_evtchn_ppi(void)
return NULL;
}
-bool_t dt_match_node(const struct dt_device_match *matches,
- const struct dt_device_node *node)
+const struct dt_device_match *
+dt_match_node(const struct dt_device_match *matches,
+ const struct dt_device_node *node)
{
if ( !matches )
- return 0;
+ return NULL;
while ( matches->path || matches->type ||
matches->compatible || matches->not_available )
match &= !dt_device_is_available(node);
if ( match )
- return match;
-
+ return matches;
matches++;
}
- return 0;
+ return NULL;
}
const struct dt_device_node *dt_get_parent(const struct dt_device_node *node)
const char *type;
const char *compatible;
const bool_t not_available;
+ const void *data;
};
#define DT_MATCH_PATH(p) { .path = p }
*
* Returns true if the device node match one of dt_device_match.
*/
-bool_t dt_match_node(const struct dt_device_match *matches,
- const struct dt_device_node *node);
+const struct dt_device_match *
+dt_match_node(const struct dt_device_match *matches,
+ const struct dt_device_node *node);
/**
* dt_find_matching_node - Find a node based on an dt_device_match match table