| 433 | } |
| 434 | |
| 435 | static struct rt_ofw_node_id *ofw_prop_match(struct rt_ofw_prop *prop, const struct rt_ofw_node_id *ids) |
| 436 | { |
| 437 | int best_index = RT_UINT32_MAX >> 1, index; |
| 438 | struct rt_ofw_node_id *found_id = RT_NULL, *id; |
| 439 | |
| 440 | for (id = (struct rt_ofw_node_id *)ids; id->compatible[0]; ++id) |
| 441 | { |
| 442 | index = ofw_prop_index_of_compatible(prop, id->compatible); |
| 443 | |
| 444 | if (index >= 0 && index < best_index) |
| 445 | { |
| 446 | found_id = id; |
| 447 | best_index = index; |
| 448 | } |
| 449 | } |
| 450 | |
| 451 | return found_id; |
| 452 | } |
| 453 | |
| 454 | struct rt_ofw_node_id *rt_ofw_prop_match(struct rt_ofw_prop *prop, const struct rt_ofw_node_id *ids) |
| 455 | { |
no test coverage detected