Lines Matching refs:it
245 * of_node_put() will be called on it
248 * of_node_put() on it when done.
311 * NULL, local thread number within the core is returned in it.
343 * core is returned in it.
349 * for thread ids on PowerPC. If it doesn't exist fallback to
378 * of_node_put() on it when done. Returns NULL if not found.
431 * for it, so call of_node_put() on it when done. Returns NULL if not found.
658 * of_node_put() on it when done.
679 * This is like of_get_parent() except that it drops the
680 * refcount on the passed node, making it suitable for iterating
684 * of_node_put() on it when done.
727 * it when done. Returns NULL when prev is the last child. Decrements the
748 * This function is like of_get_next_child(), except that it
779 * on it when done. Returns NULL when prev is the last child. Decrements
819 * Return: a node pointer with refcount incremented, use of_node_put() on it
844 * of_node_put() on it when done.
911 * of_node_put() on it when done.
969 * of_node_put() on it when done.
997 * of_node_put() on it when done.
1021 * returned. of_node_put() will be called on it
1027 * of_node_put() on it when done.
1052 * returned. of_node_put() will be called on it
1056 * of_node_put() on it when done.
1129 * returned. of_node_put() will be called on it
1134 * of_node_put() on it when done.
1194 * of_node_put() on it when done.
1240 int of_phandle_iterator_init(struct of_phandle_iterator *it,
1249 memset(it, 0, sizeof(*it));
1262 it->cells_name = cells_name;
1263 it->cell_count = cell_count;
1264 it->parent = np;
1265 it->list_end = list + size / sizeof(*list);
1266 it->phandle_end = list;
1267 it->cur = list;
1273 int of_phandle_iterator_next(struct of_phandle_iterator *it)
1277 if (it->node) {
1278 of_node_put(it->node);
1279 it->node = NULL;
1282 if (!it->cur || it->phandle_end >= it->list_end)
1285 it->cur = it->phandle_end;
1287 /* If phandle is 0, then it is an empty entry with no arguments. */
1288 it->phandle = be32_to_cpup(it->cur++);
1290 if (it->phandle) {
1296 it->node = of_find_node_by_phandle(it->phandle);
1298 if (it->cells_name) {
1299 if (!it->node) {
1301 it->parent);
1305 if (of_property_read_u32(it->node, it->cells_name,
1312 if (it->cell_count >= 0) {
1313 count = it->cell_count;
1316 it->parent,
1317 it->cells_name,
1318 it->node);
1323 count = it->cell_count;
1330 if (it->cur + count > it->list_end) {
1331 if (it->cells_name)
1333 it->parent, it->cells_name,
1334 count, it->list_end - it->cur);
1337 it->parent, of_node_full_name(it->node),
1338 count, it->list_end - it->cur);
1343 it->phandle_end = it->cur + count;
1344 it->cur_count = count;
1349 if (it->node) {
1350 of_node_put(it->node);
1351 it->node = NULL;
1358 int of_phandle_iterator_args(struct of_phandle_iterator *it,
1364 count = it->cur_count;
1370 args[i] = be32_to_cpup(it->cur++);
1381 struct of_phandle_iterator it;
1385 of_for_each_phandle(&it, rc, np, list_name, cells_name, cell_count) {
1394 if (!it.phandle)
1400 c = of_phandle_iterator_args(&it,
1403 out_args->np = it.node;
1406 of_node_put(it.node);
1409 /* Found it! return success */
1423 of_node_put(it.node);
1435 * of_node_put() on it when done.
1504 * of_parse_phandle_with_args_map() - Find a node pointed by phandle in a list and remap it
1747 struct of_phandle_iterator it;
1767 rc = of_phandle_iterator_init(&it, np, list_name, cells_name, -1);
1771 while ((rc = of_phandle_iterator_next(&it)) == 0)
1794 /* duplicate ! don't insert it */
1855 * Note that we don't actually remove it, since we have given out
1858 * list, so it won't be found any more.
1914 * not exist, add it.
1916 * Note that we don't actually remove it, since we have given out
2080 /* Zero bitmap field to make sure that all the time it is clean */
2146 * /chosen node. If it does then register it as the preferred console.
2168 * of_node_put() on it when done. Caller should hold a reference
2232 * matched; if it points to a NULL value, it will receive the device node of