| 278 | } |
| 279 | |
| 280 | static int |
| 281 | check_compatible(const struct dt_file *f, const char *compatible) |
| 282 | { |
| 283 | const char *c = (char *)f->buf; |
| 284 | unsigned int len, remains = f->len; |
| 285 | |
| 286 | while (remains) { |
| 287 | len = strlen(c); |
| 288 | if (!strcmp(c, compatible)) |
| 289 | return 1; |
| 290 | |
| 291 | if (remains < len + 1) |
| 292 | break; |
| 293 | |
| 294 | c += (len + 1); |
| 295 | remains -= (len + 1); |
| 296 | } |
| 297 | return 0; |
| 298 | } |
| 299 | |
| 300 | const struct device_node * |
| 301 | of_find_compatible_node(const struct device_node *from, |
no test coverage detected