Lines Matching refs:it

1239 int of_phandle_iterator_init(struct of_phandle_iterator *it,  in of_phandle_iterator_init()  argument
1248 memset(it, 0, sizeof(*it)); in of_phandle_iterator_init()
1261 it->cells_name = cells_name; in of_phandle_iterator_init()
1262 it->cell_count = cell_count; in of_phandle_iterator_init()
1263 it->parent = np; in of_phandle_iterator_init()
1264 it->list_end = list + size / sizeof(*list); in of_phandle_iterator_init()
1265 it->phandle_end = list; in of_phandle_iterator_init()
1266 it->cur = list; in of_phandle_iterator_init()
1272 int of_phandle_iterator_next(struct of_phandle_iterator *it) in of_phandle_iterator_next() argument
1276 if (it->node) { in of_phandle_iterator_next()
1277 of_node_put(it->node); in of_phandle_iterator_next()
1278 it->node = NULL; in of_phandle_iterator_next()
1281 if (!it->cur || it->phandle_end >= it->list_end) in of_phandle_iterator_next()
1284 it->cur = it->phandle_end; in of_phandle_iterator_next()
1287 it->phandle = be32_to_cpup(it->cur++); in of_phandle_iterator_next()
1289 if (it->phandle) { in of_phandle_iterator_next()
1295 it->node = of_find_node_by_phandle(it->phandle); in of_phandle_iterator_next()
1297 if (it->cells_name) { in of_phandle_iterator_next()
1298 if (!it->node) { in of_phandle_iterator_next()
1300 it->parent, it->phandle); in of_phandle_iterator_next()
1304 if (of_property_read_u32(it->node, it->cells_name, in of_phandle_iterator_next()
1311 if (it->cell_count >= 0) { in of_phandle_iterator_next()
1312 count = it->cell_count; in of_phandle_iterator_next()
1315 it->parent, in of_phandle_iterator_next()
1316 it->cells_name, in of_phandle_iterator_next()
1317 it->node); in of_phandle_iterator_next()
1322 count = it->cell_count; in of_phandle_iterator_next()
1329 if (it->cur + count > it->list_end) { in of_phandle_iterator_next()
1331 it->parent, it->cells_name, in of_phandle_iterator_next()
1332 count, it->cell_count); in of_phandle_iterator_next()
1337 it->phandle_end = it->cur + count; in of_phandle_iterator_next()
1338 it->cur_count = count; in of_phandle_iterator_next()
1343 if (it->node) { in of_phandle_iterator_next()
1344 of_node_put(it->node); in of_phandle_iterator_next()
1345 it->node = NULL; in of_phandle_iterator_next()
1352 int of_phandle_iterator_args(struct of_phandle_iterator *it, in of_phandle_iterator_args() argument
1358 count = it->cur_count; in of_phandle_iterator_args()
1364 args[i] = be32_to_cpup(it->cur++); in of_phandle_iterator_args()
1375 struct of_phandle_iterator it; in __of_parse_phandle_with_args() local
1379 of_for_each_phandle(&it, rc, np, list_name, cells_name, cell_count) { in __of_parse_phandle_with_args()
1388 if (!it.phandle) in __of_parse_phandle_with_args()
1394 c = of_phandle_iterator_args(&it, in __of_parse_phandle_with_args()
1397 out_args->np = it.node; in __of_parse_phandle_with_args()
1400 of_node_put(it.node); in __of_parse_phandle_with_args()
1417 of_node_put(it.node); in __of_parse_phandle_with_args()
1740 struct of_phandle_iterator it; in of_count_phandle_with_args() local
1760 rc = of_phandle_iterator_init(&it, np, list_name, cells_name, -1); in of_count_phandle_with_args()
1764 while ((rc = of_phandle_iterator_next(&it)) == 0) in of_count_phandle_with_args()