Lines Matching refs:it

1180 int of_phandle_iterator_init(struct of_phandle_iterator *it,  in of_phandle_iterator_init()  argument
1189 memset(it, 0, sizeof(*it)); in of_phandle_iterator_init()
1195 it->cells_name = cells_name; in of_phandle_iterator_init()
1196 it->cell_count = cell_count; in of_phandle_iterator_init()
1197 it->parent = np; in of_phandle_iterator_init()
1198 it->list_end = list + size / sizeof(*list); in of_phandle_iterator_init()
1199 it->phandle_end = list; in of_phandle_iterator_init()
1200 it->cur = list; in of_phandle_iterator_init()
1206 int of_phandle_iterator_next(struct of_phandle_iterator *it) in of_phandle_iterator_next() argument
1210 if (it->node) { in of_phandle_iterator_next()
1211 of_node_put(it->node); in of_phandle_iterator_next()
1212 it->node = NULL; in of_phandle_iterator_next()
1215 if (!it->cur || it->phandle_end >= it->list_end) in of_phandle_iterator_next()
1218 it->cur = it->phandle_end; in of_phandle_iterator_next()
1221 it->phandle = be32_to_cpup(it->cur++); in of_phandle_iterator_next()
1223 if (it->phandle) { in of_phandle_iterator_next()
1229 it->node = of_find_node_by_phandle(it->phandle); in of_phandle_iterator_next()
1231 if (it->cells_name) { in of_phandle_iterator_next()
1232 if (!it->node) { in of_phandle_iterator_next()
1234 it->parent); in of_phandle_iterator_next()
1238 if (of_property_read_u32(it->node, it->cells_name, in of_phandle_iterator_next()
1241 it->parent, in of_phandle_iterator_next()
1242 it->cells_name, in of_phandle_iterator_next()
1243 it->node); in of_phandle_iterator_next()
1247 count = it->cell_count; in of_phandle_iterator_next()
1254 if (it->cur + count > it->list_end) { in of_phandle_iterator_next()
1256 it->parent); in of_phandle_iterator_next()
1261 it->phandle_end = it->cur + count; in of_phandle_iterator_next()
1262 it->cur_count = count; in of_phandle_iterator_next()
1267 if (it->node) { in of_phandle_iterator_next()
1268 of_node_put(it->node); in of_phandle_iterator_next()
1269 it->node = NULL; in of_phandle_iterator_next()
1276 int of_phandle_iterator_args(struct of_phandle_iterator *it, in of_phandle_iterator_args() argument
1282 count = it->cur_count; in of_phandle_iterator_args()
1288 args[i] = be32_to_cpup(it->cur++); in of_phandle_iterator_args()
1299 struct of_phandle_iterator it; in __of_parse_phandle_with_args() local
1303 of_for_each_phandle(&it, rc, np, list_name, cells_name, cell_count) { in __of_parse_phandle_with_args()
1312 if (!it.phandle) in __of_parse_phandle_with_args()
1318 c = of_phandle_iterator_args(&it, in __of_parse_phandle_with_args()
1321 out_args->np = it.node; in __of_parse_phandle_with_args()
1324 of_node_put(it.node); in __of_parse_phandle_with_args()
1341 of_node_put(it.node); in __of_parse_phandle_with_args()
1657 struct of_phandle_iterator it; in of_count_phandle_with_args() local
1660 rc = of_phandle_iterator_init(&it, np, list_name, cells_name, 0); in of_count_phandle_with_args()
1664 while ((rc = of_phandle_iterator_next(&it)) == 0) in of_count_phandle_with_args()