Lines Matching refs:it

1235 int of_phandle_iterator_init(struct of_phandle_iterator *it,  in of_phandle_iterator_init()  argument
1244 memset(it, 0, sizeof(*it)); in of_phandle_iterator_init()
1257 it->cells_name = cells_name; in of_phandle_iterator_init()
1258 it->cell_count = cell_count; in of_phandle_iterator_init()
1259 it->parent = np; in of_phandle_iterator_init()
1260 it->list_end = list + size / sizeof(*list); in of_phandle_iterator_init()
1261 it->phandle_end = list; in of_phandle_iterator_init()
1262 it->cur = list; in of_phandle_iterator_init()
1268 int of_phandle_iterator_next(struct of_phandle_iterator *it) in of_phandle_iterator_next() argument
1272 if (it->node) { in of_phandle_iterator_next()
1273 of_node_put(it->node); in of_phandle_iterator_next()
1274 it->node = NULL; in of_phandle_iterator_next()
1277 if (!it->cur || it->phandle_end >= it->list_end) in of_phandle_iterator_next()
1280 it->cur = it->phandle_end; in of_phandle_iterator_next()
1283 it->phandle = be32_to_cpup(it->cur++); in of_phandle_iterator_next()
1285 if (it->phandle) { in of_phandle_iterator_next()
1291 it->node = of_find_node_by_phandle(it->phandle); in of_phandle_iterator_next()
1293 if (it->cells_name) { in of_phandle_iterator_next()
1294 if (!it->node) { in of_phandle_iterator_next()
1296 it->parent, it->phandle); in of_phandle_iterator_next()
1300 if (of_property_read_u32(it->node, it->cells_name, in of_phandle_iterator_next()
1307 if (it->cell_count >= 0) { in of_phandle_iterator_next()
1308 count = it->cell_count; in of_phandle_iterator_next()
1311 it->parent, in of_phandle_iterator_next()
1312 it->cells_name, in of_phandle_iterator_next()
1313 it->node); in of_phandle_iterator_next()
1318 count = it->cell_count; in of_phandle_iterator_next()
1325 if (it->cur + count > it->list_end) { in of_phandle_iterator_next()
1326 if (it->cells_name) in of_phandle_iterator_next()
1328 it->parent, it->cells_name, in of_phandle_iterator_next()
1329 count, it->list_end - it->cur); in of_phandle_iterator_next()
1332 it->parent, of_node_full_name(it->node), in of_phandle_iterator_next()
1333 count, it->list_end - it->cur); in of_phandle_iterator_next()
1338 it->phandle_end = it->cur + count; in of_phandle_iterator_next()
1339 it->cur_count = count; in of_phandle_iterator_next()
1344 if (it->node) { in of_phandle_iterator_next()
1345 of_node_put(it->node); in of_phandle_iterator_next()
1346 it->node = NULL; in of_phandle_iterator_next()
1353 int of_phandle_iterator_args(struct of_phandle_iterator *it, in of_phandle_iterator_args() argument
1359 count = it->cur_count; in of_phandle_iterator_args()
1365 args[i] = be32_to_cpup(it->cur++); in of_phandle_iterator_args()
1376 struct of_phandle_iterator it; in __of_parse_phandle_with_args() local
1383 of_for_each_phandle(&it, rc, np, list_name, cells_name, cell_count) { in __of_parse_phandle_with_args()
1392 if (!it.phandle) in __of_parse_phandle_with_args()
1398 c = of_phandle_iterator_args(&it, in __of_parse_phandle_with_args()
1401 out_args->np = it.node; in __of_parse_phandle_with_args()
1404 of_node_put(it.node); in __of_parse_phandle_with_args()
1421 of_node_put(it.node); in __of_parse_phandle_with_args()
1615 struct of_phandle_iterator it; in of_count_phandle_with_args() local
1635 rc = of_phandle_iterator_init(&it, np, list_name, cells_name, -1); in of_count_phandle_with_args()
1639 while ((rc = of_phandle_iterator_next(&it)) == 0) in of_count_phandle_with_args()