| 298 | } |
| 299 | |
| 300 | const struct device_node * |
| 301 | of_find_compatible_node(const struct device_node *from, |
| 302 | const char *type __rte_unused, |
| 303 | const char *compatible) |
| 304 | { |
| 305 | const struct dt_dir *d; |
| 306 | |
| 307 | DPAAX_HWWARN(!alive, "Device-tree driver not initialised!"); |
| 308 | |
| 309 | if (list_empty(&linear)) |
| 310 | return NULL; |
| 311 | if (!from) |
| 312 | d = list_entry(linear.next, struct dt_dir, linear); |
| 313 | else |
| 314 | d = node2dir(from); |
| 315 | for (d = next_linear(d); d && (!d->compatible || |
| 316 | !check_compatible(d->compatible, |
| 317 | compatible)); |
| 318 | d = next_linear(d)) |
| 319 | ; |
| 320 | if (d) |
| 321 | return &d->node.node; |
| 322 | return NULL; |
| 323 | } |
| 324 | |
| 325 | const void * |
| 326 | of_get_property(const struct device_node *from, const char *name, |
no test coverage detected