| 223 | } |
| 224 | |
| 225 | int fdt_subnode_offset_namelen(const void *fdt, int offset, |
| 226 | const char *name, int namelen) |
| 227 | { |
| 228 | int depth; |
| 229 | |
| 230 | FDT_RO_PROBE(fdt); |
| 231 | |
| 232 | for (depth = 0; |
| 233 | (offset >= 0) && (depth >= 0); |
| 234 | offset = fdt_next_node(fdt, offset, &depth)) |
| 235 | if ((depth == 1) |
| 236 | && fdt_nodename_eq_(fdt, offset, name, namelen)) |
| 237 | return offset; |
| 238 | |
| 239 | if (depth < 0) |
| 240 | return -FDT_ERR_NOTFOUND; |
| 241 | return offset; /* error */ |
| 242 | } |
| 243 | |
| 244 | int fdt_subnode_offset(const void *fdt, int parentoffset, |
| 245 | const char *name) |
no test coverage detected