const struct of_device_id *of_match_node(const struct of_device_id *matches, const struct device_node *node) { while (matches->name[0] || matches->type[0] || matches->compatible[0]) { printk ("TALITOS MATCH %s -- %s -- %s -- %s -- %s\n", matches->name, node->name, matches->type, node->type, matches->compatible); int match = 1; if (matches->name[0]) match &= node->name && !strcmp(matches->name, node->name); if (matches->type[0]) match &= node->type && !strcmp(matches->type, node->type); if (matches->compatible[0]) match &= of_device_is_compatible(node, matches->compatible); printk ("MATCH = %d\n", match); if (match) return matches; matches++; } return NULL; }